Skip to content

Commit

Permalink
[openssl] Add -ldl to the link line when appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkaratarakis committed Apr 24, 2018
1 parent d2f6944 commit c400cea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ports/openssl/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 4 additions & 0 deletions ports/openssl/portfile-nonwindows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
7 changes: 7 additions & 0 deletions ports/openssl/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit c400cea

Please sign in to comment.