Clion+qt5找不到Config错误
CMake Error at CMakeLists.txt:11 (find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5" with any of
the following names:
Qt5Config.cmake
qt5-config.cmake
Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed.
解决方法:
在cmakelists.txt中更改config的位置
找到Qt5Config.cmake的位置,在下面这句代码中更改它的路径即可
问题解决
set(CMAKE_PREFIX_PATH "D:/QT/Qt5.14.2/5.14.2/mingw73_64/lib/cmake/Qt5")