Skip to content

Commit 57054e1

Browse files
authoredJun 3, 2024··
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>
1 parent 6dead4f commit 57054e1

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed
 

‎CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.12...3.27 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.12...3.27)
22

33
PROJECT(sioclient
44
VERSION 3.1.0
@@ -62,7 +62,7 @@ else()
6262
find_package(websocketpp CONFIG REQUIRED)
6363
find_package(asio CONFIG REQUIRED)
6464
find_package(RapidJSON CONFIG REQUIRED)
65-
target_link_libraries(sioclient PRIVATE websocketpp::websocketpp asio asio::asio rapidjson)
65+
target_link_libraries(sioclient PRIVATE websocketpp::websocketpp asio::asio rapidjson)
6666
endif()
6767

6868
include(GNUInstallDirs)

‎INSTALL.md

+11
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,14 @@ vcpkg install socket-io-client
2626
```
2727

2828
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.
29+
30+
### With Conan
31+
32+
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:
33+
34+
```
35+
conan install --requires="sioclient/[*]" --build=missing
36+
```
37+
38+
The Socket.IO client Conan recipe is kept up to date by Conan maintainers and community contributors.
39+
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.

‎README.md

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

0 commit comments

Comments
 (0)
Please sign in to comment.