diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2020-06-11 08:52:35 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-10 17:52:35 -0700 |
| commit | d8383c37b315307cf7898200c873659c8121000c (patch) | |
| tree | fb019d957e3d264c6860a052bc5f29aa078fc148 | |
| parent | f9c7bf832b96a1a6bfdf7017c718a96bc1637bbe (diff) | |
| download | vcpkg-d8383c37b315307cf7898200c873659c8121000c.tar.gz vcpkg-d8383c37b315307cf7898200c873659c8121000c.zip | |
[cpprestsdk] Fix find dependency openssl (#11867)
* [cpprestsdk] Fix find dependency openssl
* Update portfile.cmake
Co-authored-by: Lily <47812810+LilyWangL@users.noreply.github.com>
| -rw-r--r-- | ports/cpprestsdk/CONTROL | 2 | ||||
| -rw-r--r-- | ports/cpprestsdk/fix-find-openssl.patch | 18 | ||||
| -rw-r--r-- | ports/cpprestsdk/portfile.cmake | 13 |
3 files changed, 25 insertions, 8 deletions
diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index 936209f50..64ce95aae 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,5 @@ Source: cpprestsdk -Version: 2.10.16-1 +Version: 2.10.16-2 Build-Depends: openssl (!uwp&!windows), boost-system (!uwp&!windows), boost-date-time (!uwp&!windows), boost-regex (!uwp&!windows), boost-thread (!uwp&!windows), boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!windows), diff --git a/ports/cpprestsdk/fix-find-openssl.patch b/ports/cpprestsdk/fix-find-openssl.patch new file mode 100644 index 000000000..ec420e677 --- /dev/null +++ b/ports/cpprestsdk/fix-find-openssl.patch @@ -0,0 +1,18 @@ +diff --git a/Release/cmake/cpprest_find_openssl.cmake b/Release/cmake/cpprest_find_openssl.cmake +index 9333663..c1df089 100644 +--- a/Release/cmake/cpprest_find_openssl.cmake ++++ b/Release/cmake/cpprest_find_openssl.cmake +@@ -36,8 +36,11 @@ function(cpprest_find_openssl) + # Prefer a homebrew version of OpenSSL over the one in /usr/lib + file(GLOB OPENSSL_ROOT_DIR /usr/local/Cellar/openssl*/*) + # Prefer the latest (make the latest one first) +- list(REVERSE OPENSSL_ROOT_DIR) +- list(GET OPENSSL_ROOT_DIR 0 OPENSSL_ROOT_DIR) ++ if(OPENSSL_ROOT_DIR) ++ # Prefer the latest (make the latest one first) ++ list(REVERSE OPENSSL_ROOT_DIR) ++ list(GET OPENSSL_ROOT_DIR 0 OPENSSL_ROOT_DIR) ++ endif() + endif() + # This should prevent linking against the system provided 0.9.8y + message(STATUS "OPENSSL_ROOT_DIR = ${OPENSSL_ROOT_DIR}") diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index f6cfe2b98..8142c22a9 100644 --- a/ports/cpprestsdk/portfile.cmake +++ b/ports/cpprestsdk/portfile.cmake @@ -4,10 +4,11 @@ vcpkg_from_github( REF v2.10.16 SHA512 d850b26051439dd10edcecd006075c64c61c565193cd76870af175bd343a72ecc59485deb0f907807071a57dd256b67139ad5d016f19cb38f7142357f430be1c HEAD_REF master + PATCHES fix-find-openssl.patch ) set(OPTIONS) -if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(NOT VCPKG_TARGET_IS_UWP) SET(WEBSOCKETPP_PATH "${CURRENT_INSTALLED_DIR}/share/websocketpp") list(APPEND OPTIONS -DWEBSOCKETPP_CONFIG=${WEBSOCKETPP_PATH} @@ -39,11 +40,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/share/cpprestsdk) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/share ${CURRENT_PACKAGES_DIR}/lib/share) +vcpkg_copy_pdbs() -file(INSTALL - ${SOURCE_PATH}/license.txt - DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpprestsdk RENAME copyright) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/share/${PORT}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/share ${CURRENT_PACKAGES_DIR}/lib/share) -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
