vcpkg/ports/socket-io-client/fix-file-not-found.patch
JonLiu1993 be57a4230a
[socket-io-client] update to 3.0.0 (#18646)
* [socket-io-client] update to 3.0.0

* update version

* update patch file

* update version
2021-07-01 07:38:43 -07:00

39 lines
1.3 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 19c5e54..ca8a00d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,16 +31,20 @@ add_definitions(
-D_WEBSOCKETPP_CPP11_FUNCTIONAL_
)
+find_package(websocketpp CONFIG REQUIRED)
+find_package(asio CONFIG REQUIRED)
+find_package(RapidJSON CONFIG REQUIRED)
+
add_library(sioclient ${ALL_SRC})
target_include_directories(sioclient PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src
- ${CMAKE_CURRENT_LIST_DIR}/lib/websocketpp
- ${CMAKE_CURRENT_LIST_DIR}/lib/rapidjson/include
- ${CMAKE_CURRENT_LIST_DIR}/lib/asio/asio/include
)
set_property(TARGET sioclient PROPERTY CXX_STANDARD 11)
set_property(TARGET sioclient PROPERTY CXX_STANDARD_REQUIRED ON)
+target_link_libraries(sioclient PRIVATE websocketpp::websocketpp)
+target_link_libraries(sioclient PRIVATE asio asio::asio)
+target_link_libraries(sioclient PRIVATE rapidjson)
if(BUILD_SHARED_LIBS)
set_target_properties(sioclient
@@ -56,9 +60,6 @@ if(OPENSSL_FOUND)
add_library(sioclient_tls ${ALL_SRC})
target_include_directories(sioclient_tls PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src
- ${CMAKE_CURRENT_LIST_DIR}/lib/websocketpp
- ${CMAKE_CURRENT_LIST_DIR}/lib/rapidjson/include
- ${CMAKE_CURRENT_LIST_DIR}/lib/asio/asio/include
${OPENSSL_INCLUDE_DIR}
)