mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 04:34:07 +08:00
[socket-io-client] update to 3.0.0 (#18646)
* [socket-io-client] update to 3.0.0 * update version * update patch file * update version
This commit is contained in:
parent
b8f610edb8
commit
be57a4230a
@ -1,4 +0,0 @@
|
||||
Source: socket-io-client
|
||||
Version: 1.6.1-1
|
||||
Description: C++11 implementation of Socket.IO client
|
||||
Build-Depends: boost, rapidjson, websocketpp
|
13
ports/socket-io-client/fix-error-C3321.patch
Normal file
13
ports/socket-io-client/fix-error-C3321.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/internal/sio_client_impl.cpp b/src/internal/sio_client_impl.cpp
|
||||
index f78aea4..6780e26 100644
|
||||
--- a/src/internal/sio_client_impl.cpp
|
||||
+++ b/src/internal/sio_client_impl.cpp
|
||||
@@ -286,7 +286,7 @@ namespace sio
|
||||
if(ec || m_con.expired())
|
||||
{
|
||||
if (ec != asio::error::operation_aborted)
|
||||
- LOG("ping exit,con is expired?"<<m_con.expired()<<",ec:"<<ec.message()<<endl){};
|
||||
+ LOG("ping exit,con is expired?"<<m_con.expired()<<",ec:"<<ec.message()<<endl);
|
||||
return;
|
||||
}
|
||||
packet p(packet::frame_ping);
|
38
ports/socket-io-client/fix-file-not-found.patch
Normal file
38
ports/socket-io-client/fix-file-not-found.patch
Normal file
@ -0,0 +1,38 @@
|
||||
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}
|
||||
)
|
||||
|
@ -1,22 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8c2fad3..3f322b2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -72,13 +72,11 @@ list(APPEND TARGET_LIBRARIES sioclient_tls)
|
||||
endif()
|
||||
|
||||
install(FILES ${ALL_HEADERS}
|
||||
- DESTINATION "${CMAKE_CURRENT_LIST_DIR}/build/include"
|
||||
+ DESTINATION include
|
||||
)
|
||||
|
||||
install(TARGETS ${TARGET_LIBRARIES}
|
||||
- DESTINATION "${CMAKE_CURRENT_LIST_DIR}/build/lib/${CMAKE_BUILD_TYPE}"
|
||||
-)
|
||||
-
|
||||
-install(FILES ${Boost_LIBRARIES}
|
||||
- DESTINATION "${CMAKE_CURRENT_LIST_DIR}/build/lib/${CMAKE_BUILD_TYPE}"
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib
|
||||
)
|
@ -3,12 +3,16 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO socketio/socket.io-client-cpp
|
||||
REF 1.6.1
|
||||
SHA512 01c9c172e58a16b25af07c6bde593507792726aca28a9b202ed9531d51cd7e77c7e7d536102e50265d66de96e9708616075902dfdcfc72983758755381bad707
|
||||
REF 3.0.0
|
||||
SHA512 42735d73d24546b37332d649a2633f4a1b6e004b016c45d53bd8e230a157753bb319c80a59721865b9c3dcc588b4eec3cdf4ae9f7fc2cdf290b6bb07c866552c
|
||||
HEAD_REF master
|
||||
PATCHES fix-install.patch
|
||||
PATCHES
|
||||
fix-file-not-found.patch
|
||||
fix-error-C3321.patch
|
||||
)
|
||||
|
||||
file(REMOVE "${SOURCE_PATH}/cmake/modules/Findzstd.cmake")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
@ -18,5 +22,4 @@ vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Handle copyright
|
||||
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/socket-io-client/copyright COPYONLY)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
11
ports/socket-io-client/vcpkg.json
Normal file
11
ports/socket-io-client/vcpkg.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "socket-io-client",
|
||||
"version": "3.0.0",
|
||||
"description": "C++11 implementation of Socket.IO client",
|
||||
"homepage": "https://github.com/socketio/socket.io-client-cpp",
|
||||
"dependencies": [
|
||||
"asio",
|
||||
"rapidjson",
|
||||
"websocketpp"
|
||||
]
|
||||
}
|
@ -5837,7 +5837,7 @@
|
||||
"port-version": 3
|
||||
},
|
||||
"socket-io-client": {
|
||||
"baseline": "1.6.1-1",
|
||||
"baseline": "3.0.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"sockpp": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a84a0e4ab231050bf881b44603070de5da27ae05",
|
||||
"version": "3.0.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "72d40d2e1c52ff3be1a8ac23f9f45baeed8cbe58",
|
||||
"version-string": "1.6.1-1",
|
||||
|
Loading…
Reference in New Issue
Block a user