Skip to content

Commit e39cbe6

Browse files
authored
Change target_link_libraries visibility for dependencies
Add PUBLIC OpenSSL target link library so it gets transitive.
1 parent 1d38358 commit e39cbe6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
178178
INTERFACE NOMINMAX # avoid Win macro definition of min/max, use std one
179179
INTERFACE _SCL_SECURE_NO_WARNINGS) # disable security-paranoia warning
180180
endif()
181-
target_link_libraries(${PROJECT_NAME} Ws2_32 ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY} crypt32 cryptui)
181+
target_link_libraries(${PROJECT_NAME} PUBLIC ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY} PRIVATE Ws2_32 crypt32 cryptui)
182182
else()
183183
#For other compiler create the library as a static library
184184
add_library(${PROJECT_NAME}

0 commit comments

Comments
 (0)