diff options
Diffstat (limited to 'contrib/vcpkg-ports/openssl/unix/vcpkg-cmake-wrapper.cmake')
-rw-r--r-- | contrib/vcpkg-ports/openssl/unix/vcpkg-cmake-wrapper.cmake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/vcpkg-ports/openssl/unix/vcpkg-cmake-wrapper.cmake b/contrib/vcpkg-ports/openssl/unix/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..f36b687 --- /dev/null +++ b/contrib/vcpkg-ports/openssl/unix/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,18 @@ +_find_package(${ARGS}) +if(OPENSSL_FOUND) + find_library(OPENSSL_DL_LIBRARY NAMES dl) + if(OPENSSL_DL_LIBRARY) + list(APPEND OPENSSL_LIBRARIES "dl") + if(TARGET OpenSSL::Crypto) + set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl") + endif() + endif() + find_package(Threads REQUIRED) + list(APPEND OPENSSL_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) + if(TARGET OpenSSL::Crypto) + set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Threads::Threads") + endif() + if(TARGET OpenSSL::SSL) + set_property(TARGET OpenSSL::SSL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Threads::Threads") + endif() +endif() |