编译 https://github.com/Martchus/qtutilities 的代码库时,qt5.7.1已经安装了,可以 cmake .时还是出错:
CMake Error at cmake/modules/QtLinkage.cmake:83 (find_package):
By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Widgets"
(requested version 5.6) with any of the following names:
Qt5WidgetsConfig.cmake
qt5widgets-config.cmake
解决办法: 指定 cmake 路径
CMAKE_PREFIX_PATH=/opt/Qt5.7.1/5.7/gcc_64/lib/cmake/ cmake .