ssl/tls cmake: fix shared library dependencies
Ensure that the 'ssl' depends on 'crypto' and that 'tls' depends on 'ssl' and 'crypto' for all platforms. Prior to this commit, the dependency was only specified for the 'WIN32' CMake build.
This commit is contained in:
parent
5ec2c381e4
commit
1dd6a52f2d
@ -52,8 +52,9 @@ if (BUILD_SHARED)
|
|||||||
add_library(ssl STATIC $<TARGET_OBJECTS:ssl-objects>)
|
add_library(ssl STATIC $<TARGET_OBJECTS:ssl-objects>)
|
||||||
add_library(ssl-shared SHARED $<TARGET_OBJECTS:ssl-objects>)
|
add_library(ssl-shared SHARED $<TARGET_OBJECTS:ssl-objects>)
|
||||||
export_symbol(ssl-shared ${CMAKE_CURRENT_SOURCE_DIR}/ssl.sym)
|
export_symbol(ssl-shared ${CMAKE_CURRENT_SOURCE_DIR}/ssl.sym)
|
||||||
|
target_link_libraries(ssl-shared crypto-shared)
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(ssl-shared crypto-shared Ws2_32.lib)
|
target_link_libraries(ssl-shared Ws2_32.lib)
|
||||||
set(SSL_POSTFIX -${SSL_MAJOR_VERSION})
|
set(SSL_POSTFIX -${SSL_MAJOR_VERSION})
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(ssl-shared PROPERTIES
|
set_target_properties(ssl-shared PROPERTIES
|
||||||
|
@ -30,8 +30,9 @@ if (BUILD_SHARED)
|
|||||||
add_library(tls STATIC $<TARGET_OBJECTS:tls-objects>)
|
add_library(tls STATIC $<TARGET_OBJECTS:tls-objects>)
|
||||||
add_library(tls-shared SHARED $<TARGET_OBJECTS:tls-objects>)
|
add_library(tls-shared SHARED $<TARGET_OBJECTS:tls-objects>)
|
||||||
export_symbol(tls-shared ${CMAKE_CURRENT_SOURCE_DIR}/tls.sym)
|
export_symbol(tls-shared ${CMAKE_CURRENT_SOURCE_DIR}/tls.sym)
|
||||||
|
target_link_libraries(tls-shared ssl-shared crypto-shared)
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(tls-shared ssl-shared crypto-shared Ws2_32.lib)
|
target_link_libraries(tls-shared Ws2_32.lib)
|
||||||
set(TLS_POSTFIX -${TLS_MAJOR_VERSION})
|
set(TLS_POSTFIX -${TLS_MAJOR_VERSION})
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(tls-shared PROPERTIES
|
set_target_properties(tls-shared PROPERTIES
|
||||||
|
Loading…
Reference in New Issue
Block a user