Skip to content

Commit

Permalink
build: Flexibilize CMake version and add Conan steps in docs (#427)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
uilianries authored Jun 3, 2024
1 parent 6dead4f commit 57054e1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down
11 changes: 11 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 57054e1

Please sign in to comment.