early-access version 2853
This commit is contained in:
75
externals/vcpkg/ports/signalrclient/0001_cmake.patch
vendored
Executable file
75
externals/vcpkg/ports/signalrclient/0001_cmake.patch
vendored
Executable file
@@ -0,0 +1,75 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8c73730..4cd9074 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,7 +1,9 @@
|
||||
cmake_minimum_required (VERSION 2.8.11)
|
||||
project (signalrclient)
|
||||
|
||||
+if(NOT WIN32)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -L -lcpprest")
|
||||
+endif()
|
||||
|
||||
set(CPPREST_INCLUDE_DIR "" CACHE FILEPATH "Path to casablanca include dir")
|
||||
|
||||
@@ -16,4 +18,32 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
||||
|
||||
add_subdirectory(src/signalrclient)
|
||||
-add_subdirectory(test)
|
||||
+if(NOT DISABLE_TESTS)
|
||||
+ add_subdirectory(test)
|
||||
+endif()
|
||||
+
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
+ install(FILES include/signalrclient/_exports.h DESTINATION include/signalrclient)
|
||||
+else()
|
||||
+ file(READ include/signalrclient/_exports.h EXPORTS_H)
|
||||
+ string(REPLACE "#ifdef NO_SIGNALRCLIENT_EXPORTS" "#if 1" EXPORTS_H_2 ${EXPORTS_H})
|
||||
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/_exports.h "${EXPORTS_H_2}")
|
||||
+
|
||||
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_exports.h DESTINATION include/signalrclient)
|
||||
+endif()
|
||||
+
|
||||
+set(HEADERS
|
||||
+ include/signalrclient/connection.h
|
||||
+ include/signalrclient/connection_state.h
|
||||
+ include/signalrclient/hub_connection.h
|
||||
+ include/signalrclient/hub_exception.h
|
||||
+ include/signalrclient/hub_proxy.h
|
||||
+ include/signalrclient/log_writer.h
|
||||
+ include/signalrclient/trace_level.h
|
||||
+ include/signalrclient/transport_type.h
|
||||
+ include/signalrclient/web_exception.h)
|
||||
+
|
||||
+install(
|
||||
+ FILES ${HEADERS}
|
||||
+ DESTINATION "include/signalrclient"
|
||||
+)
|
||||
diff --git a/src/signalrclient/CMakeLists.txt b/src/signalrclient/CMakeLists.txt
|
||||
index 76a5e1b..db141eb 100644
|
||||
--- a/src/signalrclient/CMakeLists.txt
|
||||
+++ b/src/signalrclient/CMakeLists.txt
|
||||
@@ -22,6 +22,21 @@ set (SOURCES
|
||||
websocket_transport.cpp
|
||||
)
|
||||
|
||||
-add_library (signalrclient SHARED ${SOURCES})
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
+ add_definitions(-DSIGNALRCLIENT_EXPORTS)
|
||||
+else()
|
||||
+ add_definitions(-DNO_SIGNALRCLIENT_EXPORTS)
|
||||
+endif()
|
||||
+
|
||||
+add_definitions(-DUNICODE -D_UNICODE)
|
||||
+
|
||||
+add_library (signalrclient ${SOURCES})
|
||||
|
||||
target_link_libraries(signalrclient ${CPPREST_SO})
|
||||
+
|
||||
+install(
|
||||
+ TARGETS signalrclient
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ RUNTIME DESTINATION bin
|
||||
+)
|
||||
39
externals/vcpkg/ports/signalrclient/0002_fix-compile-error.patch
vendored
Executable file
39
externals/vcpkg/ports/signalrclient/0002_fix-compile-error.patch
vendored
Executable file
@@ -0,0 +1,39 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 91c2300..2439fec 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -5,6 +5,8 @@ if(NOT WIN32)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -L -lcpprest")
|
||||
endif()
|
||||
|
||||
+find_package(OpenSSL REQUIRED)
|
||||
+
|
||||
set(CPPREST_INCLUDE_DIR "" CACHE FILEPATH "Path to casablanca include dir")
|
||||
|
||||
include_directories (
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 506680d04..d8bd404a6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -13,7 +13,7 @@ include_directories (
|
||||
include
|
||||
"${CPPREST_INCLUDE_DIR}")
|
||||
|
||||
-find_library(CPPREST_SO NAMES "cpprest" PATHS ${CPPREST_LIB_DIR} REQUIRED)
|
||||
+find_package(cpprestsdk REQUIRED)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
||||
diff --git a/src/signalrclient/CMakeLists.txt b/src/signalrclient/CMakeLists.txt
|
||||
index db141eb..c4306d8 100644
|
||||
--- a/src/signalrclient/CMakeLists.txt
|
||||
+++ b/src/signalrclient/CMakeLists.txt
|
||||
@@ -32,7 +32,7 @@ add_definitions(-DUNICODE -D_UNICODE)
|
||||
|
||||
add_library (signalrclient ${SOURCES})
|
||||
|
||||
-target_link_libraries(signalrclient ${CPPREST_SO})
|
||||
+target_link_libraries(signalrclient cpprestsdk::cpprest OpenSSL::SSL OpenSSL::Crypto)
|
||||
|
||||
install(
|
||||
TARGETS signalrclient
|
||||
30
externals/vcpkg/ports/signalrclient/portfile.cmake
vendored
Executable file
30
externals/vcpkg/ports/signalrclient/portfile.cmake
vendored
Executable file
@@ -0,0 +1,30 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO SignalR/SignalR-Client-Cpp
|
||||
REF 1.0.0-beta1
|
||||
SHA512 b38f6f946f1499080071949cbcf574405118f9acfb469441e5b5b0df3e5f0d277a83b30e0d613dc5e54732b9071e3273dac1ee65129f994d5a60eef0e45bdf6c
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001_cmake.patch
|
||||
0002_fix-compile-error.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DCPPREST_SO=${CURRENT_INSTALLED_DIR}/debug/lib/cpprest_2_10d.lib
|
||||
OPTIONS_RELEASE
|
||||
-DCPPREST_SO=${CURRENT_INSTALLED_DIR}/lib/cpprest_2_10.lib
|
||||
OPTIONS
|
||||
-DCPPREST_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include
|
||||
-DDISABLE_TESTS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# copy license
|
||||
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/signalrclient)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/signalrclient/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/signalrclient/copyright)
|
||||
17
externals/vcpkg/ports/signalrclient/vcpkg.json
vendored
Executable file
17
externals/vcpkg/ports/signalrclient/vcpkg.json
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "signalrclient",
|
||||
"version-string": "1.0.0-beta1-9",
|
||||
"port-version": 2,
|
||||
"description": "C++ client for SignalR.",
|
||||
"homepage": "https://github.com/SignalR/SignalR-Client-Cpp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "cpprestsdk",
|
||||
"features": [
|
||||
"default-features",
|
||||
"websockets"
|
||||
]
|
||||
},
|
||||
"openssl"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user