aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2018-04-17 16:22:44 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2018-04-23 18:43:05 -0700
commitc400cea91de1ba91183a0097b2d179d71067727d (patch)
treeeaf460d5afad8bb6dc737fde7515064707ccf6b8
parentd2f69445b6394f197f986d1b6945e7960fd10b22 (diff)
downloadvcpkg-c400cea91de1ba91183a0097b2d179d71067727d.tar.gz
vcpkg-c400cea91de1ba91183a0097b2d179d71067727d.zip
[openssl] Add -ldl to the link line when appropriate
-rw-r--r--ports/openssl/CONTROL2
-rw-r--r--ports/openssl/portfile-nonwindows.cmake4
-rw-r--r--ports/openssl/vcpkg-cmake-wrapper.cmake7
3 files changed, 12 insertions, 1 deletions
diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL
index d5ac7c890..fe7ea5c01 100644
--- a/ports/openssl/CONTROL
+++ b/ports/openssl/CONTROL
@@ -1,3 +1,3 @@
Source: openssl
-Version: 1.0.2o-1
+Version: 1.0.2o-2
Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.
diff --git a/ports/openssl/portfile-nonwindows.cmake b/ports/openssl/portfile-nonwindows.cmake
index 3a4f69710..c324b132a 100644
--- a/ports/openssl/portfile-nonwindows.cmake
+++ b/ports/openssl/portfile-nonwindows.cmake
@@ -31,3 +31,7 @@ endforeach()
file(INSTALL ${RESOLVED_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/openssl)
file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl)
+endif()
diff --git a/ports/openssl/vcpkg-cmake-wrapper.cmake b/ports/openssl/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 000000000..1e0500055
--- /dev/null
+++ b/ports/openssl/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,7 @@
+_find_package(${ARGS})
+if(OPENSSL_FOUND)
+ list(APPEND OPENSSL_LIBRARIES "dl")
+ if(TARGET OpenSSL::Crypto)
+ set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl")
+ endif()
+endif()