From cdd57ac09bde2341bd4395565dcd8edfd094e6c7 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Tue, 16 Jun 2020 21:18:13 -0300 Subject: [PATCH] fix unbound ssl linking --- cmake/StaticBuild.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index 1c24bff27..a07a0fa2d 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -178,8 +178,10 @@ build_external(unbound "CC=${deps_cc}" "CFLAGS=-O2 ${flto}" ) add_static_target(libunbound unbound_external libunbound.a) -if(WIN32) - set_target_properties(libunbound PROPERTIES INTERFACE_LINK_LIBRARIES "ws2_32;crypt32;iphlpapi") +if(NOT WIN32) + set_target_properties(libunbound PROPERTIES INTERFACE_LINK_LIBRARIES "OpenSSL::SSL;OpenSSL::Crypto") +else() + set_target_properties(libunbound PROPERTIES INTERFACE_LINK_LIBRARIES "OpenSSL::SSL;OpenSSL::Crypto;ws2_32;crypt32;iphlpapi") endif()