mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 10:39:08 +08:00
[signalrclient] fix cpprestsdk linkage (#6606)
This commit is contained in:
parent
12a0106d03
commit
070a41de03
@ -11,14 +11,19 @@ index 91c2300..2439fec 100644
|
||||
set(CPPREST_INCLUDE_DIR "" CACHE FILEPATH "Path to casablanca include dir")
|
||||
|
||||
include_directories (
|
||||
@@ -22,6 +24,7 @@ if(NOT DISABLE_TESTS)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
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}")
|
||||
|
||||
+
|
||||
if(BUILD_SHARED_LIBS)
|
||||
install(FILES include/signalrclient/_exports.h DESTINATION include/signalrclient)
|
||||
else()
|
||||
-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
|
||||
@ -28,7 +33,7 @@ index db141eb..c4306d8 100644
|
||||
add_library (signalrclient ${SOURCES})
|
||||
|
||||
-target_link_libraries(signalrclient ${CPPREST_SO})
|
||||
+target_link_libraries(signalrclient ${CPPREST_SO} OpenSSL::SSL OpenSSL::Crypto)
|
||||
+target_link_libraries(signalrclient cpprestsdk::cpprest OpenSSL::SSL OpenSSL::Crypto)
|
||||
|
||||
install(
|
||||
TARGETS signalrclient
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: signalrclient
|
||||
Version: 1.0.0-beta1-5
|
||||
Version: 1.0.0-beta1-6
|
||||
Build-Depends: cpprestsdk, openssl
|
||||
Description: C++ client for SignalR.
|
||||
|
Loading…
Reference in New Issue
Block a user