0

I am trying to build library JCON-CPP for QT from sources. When I try to use

 cmake ..

There are errors :

 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".

I have installed libqt5webkit5. Using Qt 5.6. Maybe I have lost files of Qt5WebSockets ? Recently I've added this line in CMakeList.txt : find_package(Qt5WebSockets REQUIRED) and after that I am getting this error :

    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.

I can't figure out why CMake can't find Qt5WebSockets

nyi
  • 3,123
  • 4
  • 22
  • 45
Ladence
  • 244
  • 2
  • 9
  • Why should json require web sockets? Do you have Qt5(-dev) installed at all? With Websockets? What Cmake version are you using? – Simon Kraemer Apr 10 '18 at 08:33
  • @SimonKraemer i am using CMake 2.8.12.2 and i have installed Qt5 dev – Ladence Apr 10 '18 at 08:35
  • @SimonKraemer it's using websockets because it's JsonRPC library – Ladence Apr 10 '18 at 08:35
  • According to [the doc](https://cmake.org/cmake/help/v3.1/policy/CMP0053.html), the policy is introduced in CMake 3.1. So, you need to use recent version of cmake, either by upgrade system wide cmake or install your own (if you don't have super user access). – putu Apr 10 '18 at 09:35
  • Check if you have `libqt5websockets5-dev` installed. Websockets are unrelated to webkit – Felix Apr 10 '18 at 11:43

0 Answers0