disable shared CMake builds for OS X / Windows for now

This commit is contained in:
Brent Cook 2015-09-07 01:05:33 -05:00
parent 4078416c36
commit ca56c332e3
4 changed files with 30 additions and 12 deletions

View File

@ -158,6 +158,10 @@ if(CMAKE_HOST_WIN32)
set(OPENSSL_LIBS ${OPENSSL_LIBS} ws2_32)
endif()
if(NOT (CMAKE_SYSTEM_NAME MATCHES "Darwin" OR MSVC))
set(BUILD_SHARED true)
endif()
add_subdirectory(crypto)
add_subdirectory(ssl)
add_subdirectory(apps)

View File

@ -641,9 +641,13 @@ endif()
add_library(crypto-objects OBJECT ${CRYPTO_SRC})
set_property(TARGET crypto-objects PROPERTY POSITION_INDEPENDENT_CODE 1)
add_library(crypto STATIC $<TARGET_OBJECTS:crypto-objects>)
add_library(crypto-shared SHARED $<TARGET_OBJECTS:crypto-objects>)
set_target_properties(crypto-shared PROPERTIES OUTPUT_NAME crypto)
set_target_properties(crypto-shared PROPERTIES VERSION ${CRYPTO_VERSION} SOVERSION ${CRYPTO_MAJOR_VERSION})
install(TARGETS crypto crypto-shared DESTINATION lib)
set(CRYPTO_TARGETS crypto)
if (BUILD_SHARED)
add_library(crypto-shared SHARED $<TARGET_OBJECTS:crypto-objects>)
set_target_properties(crypto-shared PROPERTIES OUTPUT_NAME crypto)
set_target_properties(crypto-shared PROPERTIES VERSION ${CRYPTO_VERSION} SOVERSION ${CRYPTO_MAJOR_VERSION})
set(CRYPTO_TARGETS ${CRYPTO_TARGETS} crypto-shared)
endif()
install(TARGETS ${CRYPTO_TARGETS} DESTINATION lib)

View File

@ -53,8 +53,13 @@ set(
add_library(ssl-objects OBJECT ${SSL_SRC})
set_property(TARGET ssl-objects PROPERTY POSITION_INDEPENDENT_CODE 1)
add_library(ssl STATIC $<TARGET_OBJECTS:ssl-objects>)
add_library(ssl-shared SHARED $<TARGET_OBJECTS:ssl-objects>)
set_target_properties(ssl-shared PROPERTIES OUTPUT_NAME ssl)
set_target_properties(ssl-shared PROPERTIES VERSION ${SSL_VERSION} SOVERSION ${SSL_MAJOR_VERSION})
set(SSL_TARGETS ssl)
install(TARGETS ssl ssl-shared DESTINATION lib)
if (BUILD_SHARED)
add_library(ssl-shared SHARED $<TARGET_OBJECTS:ssl-objects>)
set_target_properties(ssl-shared PROPERTIES OUTPUT_NAME ssl)
set_target_properties(ssl-shared PROPERTIES VERSION ${SSL_VERSION} SOVERSION ${SSL_MAJOR_VERSION})
set(SSL_TARGETS ${SSL_TARGETS} ssl-shared)
endif()
install(TARGETS ${SSL_TARGETS} DESTINATION lib)

View File

@ -22,8 +22,13 @@ endif()
add_library(tls-objects OBJECT ${TLS_SRC})
set_property(TARGET tls-objects PROPERTY POSITION_INDEPENDENT_CODE 1)
add_library(tls STATIC $<TARGET_OBJECTS:tls-objects>)
add_library(tls-shared SHARED $<TARGET_OBJECTS:tls-objects>)
set_target_properties(tls-shared PROPERTIES OUTPUT_NAME tls)
set_target_properties(tls-shared PROPERTIES VERSION ${TLS_VERSION} SOVERSION ${TLS_MAJOR_VERSION})
set(TLS_TARGETS tls)
install(TARGETS tls tls-shared DESTINATION lib)
if (BUILD_SHARED)
add_library(tls-shared SHARED $<TARGET_OBJECTS:tls-objects>)
set_target_properties(tls-shared PROPERTIES OUTPUT_NAME tls)
set_target_properties(tls-shared PROPERTIES VERSION ${TLS_VERSION} SOVERSION ${TLS_MAJOR_VERSION})
set(TLS_TARGETS ${TLS_TARGETS} tls-shared)
endif()
install(TARGETS ${TLS_TARGETS} DESTINATION lib)