build Windows DLL on CMake

like below.
* libcrypto-38.dll
* libssl-39.dll
* libtls-11.dll
This commit is contained in:
Satoshi Yasushima
2016-08-25 18:17:27 +09:00
parent 971892766d
commit 829b21581f
4 changed files with 10 additions and 4 deletions

View File

@@ -754,8 +754,10 @@ if (BUILD_SHARED)
add_library(crypto-shared SHARED $<TARGET_OBJECTS:crypto-objects>)
if (WIN32)
target_link_libraries(crypto-shared crypto Ws2_32.lib)
set(CRYPTO_POSTFIX -${CRYPTO_MAJOR_VERSION})
endif()
set_target_properties(crypto-shared PROPERTIES OUTPUT_NAME crypto)
set_target_properties(crypto-shared PROPERTIES
OUTPUT_NAME crypto${CRYPTO_POSTFIX} ARCHIVE_OUTPUT_NAME crypto)
set_target_properties(crypto-shared PROPERTIES VERSION
${CRYPTO_VERSION} SOVERSION ${CRYPTO_MAJOR_VERSION})
install(TARGETS crypto crypto-shared DESTINATION lib)