From 233130c4c6f46762e0eee69b4ebc623a62910009 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Wed, 23 Feb 2022 17:51:38 +0100 Subject: [PATCH] cmake: fix target_link_libraries for win32 (#238) --- CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea3fd898f..e0529e296 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -429,19 +429,18 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") PRIVATE "-framework SystemConfiguration" "-framework CoreFoundation" ) endif() -target_link_libraries(re-shared - PRIVATE -L/opt/local/lib ${OPENSSL_LIBRARIES} -lpthread) - if(WIN32) - target_link_libraries(re-shared - libssl - libcrypto + target_link_libraries(re-shared PRIVATE + ${OPENSSL_LIBRARIES} qwave iphlpapi wsock32 ws2_32 ) +else() + target_link_libraries(re-shared + PRIVATE -L/opt/local/lib ${OPENSSL_LIBRARIES} -lpthread) endif() set_target_properties(re-shared PROPERTIES PUBLIC_HEADER include/re.h)