我正在尝试从源代码构建QT库JCON-CPP。当我尝试使用
时 cmake ..
有错误:
CMake Error at CMakeLists.txt:2 (cmake_policy):
Policy "CMP0043" is not known to this version of CMake.
CMake Error at CMakeLists.txt:3 (cmake_policy):
Policy "CMP0053" is not known to this version of CMake.
CMake Warning at /usr/lib/x86_64-linux-
gnu/cmake/Qt5Core/Qt5CoreMacros.cmake:273 (find_package):
Could not find a package configuration file provided by
"Qt5WebSockets"
with any of the following names:
Qt5WebSocketsConfig.cmake
qt5websockets-config.cmake
Add the installation prefix of "Qt5WebSockets" to CMAKE_PREFIX_PATH
or set
"Qt5WebSockets_DIR" to a directory containing one of the above files.
If "Qt5WebSockets" provides a separate development package or SDK, be
sure it
has been installed.
Call Stack (most recent call first):
src/CMakeLists.txt:53 (qt5_use_modules)
CMake Error at /usr/lib/x86_64-linux-
gnu/cmake/Qt5Core/Qt5CoreMacros.cmake:275 (message):
Can not use "WebSockets" module which has not yet been found.
Call Stack (most recent call first):
src/CMakeLists.txt:53 (qt5_use_modules)
-- Configuring incomplete, errors occurred!
See also "/home/yvs/Qt_Projects/json_serverrpc/build/jcon-
cpp/build/CMakeFiles/CMakeOutput.log".
我已经安装了libqt5webkit5。使用Qt 5.6。也许我丢失了Qt5WebSockets文件?最近我在CMakeList.txt中添加了这一行:find_package(Qt5WebSockets REQUIRED)
之后我收到了这个错误:
By not providing "FindQt5WebSockets.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5WebSockets", but CMake did not find one.
我无法弄清楚为什么CMake无法找到Qt5WebSockets