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()