Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
0RE0NE0 opened this issue Aug 25, 2024 · 0 comments

Comments

@0RE0NE0
Copy link

0RE0NE0 commented Aug 25, 2024

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant