socket.io-client-cpp
socket.io-client-cpp copied to clipboard
CMakeLists.txt: improve asio detection
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 ...