Skip to content

CMakeLists.txt: improve asio detection - #449

Open
jg1uaa wants to merge 1 commit into
socketio:masterfrom
jg1uaa:find-asio
Open

CMakeLists.txt: improve asio detection#449
jg1uaa wants to merge 1 commit into
socketio:masterfrom
jg1uaa:find-asio

Conversation

@jg1uaa

@jg1uaa jg1uaa commented Oct 8, 2025

Copy link
Copy Markdown

Current CMakeLists.txt uses find_package(asio CONFIGURE REQUIRED), this makes error like this:

uaa@framboise:~/z/socket.io-client-cpp/xxx$ cmake -DUSE_SUBMODULES=OFF ..
(snip)
CMake Error at CMakeLists.txt:63 (find_package):
  Could not find a package configuration file provided by "asio" with any of
  the following names:

    asioConfig.cmake
    asio-config.cmake

To solve this problem, replace with pkg_check_modules(ASIO required asio).
And, all required modules (RapidJSON, websocketpp, asio) are header-only library. target_include_directories is suitable.

Tested on Debian-13 and OpenBSD-7.7, cmake -DUSE_SUBMODULES=OFF ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant