build: Flexibilize CMake version and add Conan steps in docs (#427)

* Allow newer Cmake versions

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* comsume only asio cmake target

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Add Conan support in docs

Signed-off-by: Uilian Ries <uilianries@gmail.com>

---------

Signed-off-by: Uilian Ries <uilianries@gmail.com>
This commit is contained in:
Uilian Ries 2024-06-03 13:05:54 +02:00 committed by GitHub
parent 6dead4f0a8
commit 57054e13c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12...3.27 FATAL_ERROR)
cmake_minimum_required(VERSION 3.12...3.27)
PROJECT(sioclient
VERSION 3.1.0
@ -62,7 +62,7 @@ else()
find_package(websocketpp CONFIG REQUIRED)
find_package(asio CONFIG REQUIRED)
find_package(RapidJSON CONFIG REQUIRED)
target_link_libraries(sioclient PRIVATE websocketpp::websocketpp asio asio::asio rapidjson)
target_link_libraries(sioclient PRIVATE websocketpp::websocketpp asio::asio rapidjson)
endif()
include(GNUInstallDirs)

View File

@ -26,3 +26,14 @@ vcpkg install socket-io-client
```
The Socket.IO client port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
### With Conan
You can install pre-built binaries for Socket.IO C++ client or build it from source using [Conan](https://conan.io/). Use the following command:
```
conan install --requires="sioclient/[*]" --build=missing
```
The Socket.IO client Conan recipe is kept up to date by Conan maintainers and community contributors.
If the version is out of date, please [create an issue or pull request](https://github.com/conan-io/conan-center-index) on the ConanCenterIndex repository.

View File

@ -45,6 +45,7 @@ Note: Only the WebSocket transport is currently implemented (no fallback to HTTP
* [With CMAKE](./INSTALL.md#with-cmake)
* [Without CMAKE](./INSTALL.md#without-cmake)
* [With VCPKG](./INSTALL.md#with-vcpkg)
* [With Conan](./INSTALL.md#with-conan)
* [iOS and OS X](./INSTALL_IOS.md)
* Option 1: Cocoapods
* Option 2: Create a static library