16,818
社区成员




如题,安装log4cplus后,在CMakeLists.txt添加 find_package(log4cplus REQUIRED),提示如下(如果是单独新建的非QT项目则正常),请问是什么原因:
CMake Error at D:/Qt/Qt5.14.2/5.14.2/mingw73_64/vcpkg/scripts/buildsystems/vcpkg.cmake:857 (_find_package):
By not providing "Findlog4cplus.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"log4cplus", but CMake did not find one.
Could not find a package configuration file provided by "log4cplus" with
any of the following names:
log4cplusConfig.cmake
log4cplus-config.cmake
Add the installation prefix of "log4cplus" to CMAKE_PREFIX_PATH or set
"log4cplus_DIR" to a directory containing one of the above files. If
"log4cplus" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:23 (find_package)
-- Configuring incomplete, errors occurred!
See also "D:/SVN/Inforshare/CppSolutions/untitled16/cmake-build-debug/CMakeFiles/CMakeOutput.log".
阿西
我之前也碰到了这个问题 ,不过忘记了怎么解决的了