zaphoyd / websocketpp

C++ websocket client/server library
http://www.zaphoyd.com/websocketpp
Other
7.08k stars 1.98k forks source link

Build failed: Could not find a package configuration file provided by "websocketpp" #1141

Open 0RE0NE0 opened 3 months ago

0RE0NE0 commented 3 months ago

So, i installed websocketpp and boost via vcpkg (I'm on Win 11 with VS2017) and the CMake does find Boost but with WebsocketPP the following error comes. I found a fix for linux where libwebsocketpp-dev needed to be installed but i cant find anything similar for windows

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
CMake Error at CMakeLists.txt:16 (find_package):
  By not providing "Findwebsocketpp.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "websocketpp", but CMake did not find one.

  Could not find a package configuration file provided by "websocketpp" with
  any of the following names:

    websocketppConfig.cmake
    websocketpp-config.cmake

  Add the installation prefix of "websocketpp" to CMAKE_PREFIX_PATH or set
  "websocketpp_DIR" to a directory containing one of the above files.  If
  "websocketpp" provides a separate development package or SDK, be sure it
  has been installed.

-- Configuring incomplete, errors occurred!

Also this is my CMakeLists (yes all files in onedrive are downloaded)

cmake_minimum_required(VERSION 3.10)
project(WebSocketExample)

SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "C:/Users/Admin/OneDrive/Development/WS/vcpkg_installed/x64-windows/include")
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "C:/Users/Admin/OneDrive/Development/WS/vcpkg_installed/x64-windows/lib")

include_directories("C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um")
include_directories("C:/Users/Admin/OneDrive/Development/WS/vcpkg_installed/x64-windows/include")
include_directories("C:/Users/Admin/OneDrive/Development/WS/vcpkg_installed/x64-windows/include/**")
include_directories("C:/Users/Admin/OneDrive/Development/WS/vcpkg_installed/x64-windows/include/lib")
include_directories("C:/Users/Admin/OneDrive/Development/WS/vcpkg_installed/x64-windows/include/lib/**")

find_package(Boost REQUIRED)
find_package(websocketpp REQUIRED)

add_executable(websocket_example main.cpp)
target_link_libraries(websocket_example PRIVATE websocketpp::websocketpp)
target_link_libraries(websocket_example PRIVATE Boost::boost websocketpp)