aboutsummaryrefslogtreecommitdiff
path: root/ssl/CMakeLists.txt
diff options
context:
space:
mode:
authorkinichiro <kinichiro.inoguchi@gmail.com>2016-09-06 23:25:28 +0900
committerBrent Cook <bcook@openbsd.org>2016-10-30 21:39:36 -0500
commit62f2a73061eda53f5d60cfa7fab7dfb6bd7803ad (patch)
tree3398f894c4658264cdccc7979a82f49463b3a454 /ssl/CMakeLists.txt
parente168f3b0bc437e58f833efcfd2891892cff4e98e (diff)
downloadportable-62f2a73061eda53f5d60cfa7fab7dfb6bd7803ad.tar.gz
portable-62f2a73061eda53f5d60cfa7fab7dfb6bd7803ad.tar.bz2
portable-62f2a73061eda53f5d60cfa7fab7dfb6bd7803ad.zip
export DLLs functions for MSVC with CMake
- Add 3 DEF files to export functions from Windows DLLs - Add gettimeofday to crypto/crypto.def (*1) - Remove gai_strerrorA from tls/tls.def (*1) - Fix CMakeLists.txt to use DEF files as PRIVATE - Change DLL import library file name since it duplicates with static library - Ignore compiler warning C4267, and Edit CMAKE_C_FLAGS not to overwrite it (*1) - Add USE_SHARED option to build openssl.exe with shared libraries (*1) (*1) recommended by @mcnameej
Diffstat (limited to 'ssl/CMakeLists.txt')
-rw-r--r--ssl/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt
index 0aac799..5866e8e 100644
--- a/ssl/CMakeLists.txt
+++ b/ssl/CMakeLists.txt
@@ -53,11 +53,14 @@ if (BUILD_SHARED)
53 add_library(ssl STATIC $<TARGET_OBJECTS:ssl-objects>) 53 add_library(ssl STATIC $<TARGET_OBJECTS:ssl-objects>)
54 add_library(ssl-shared SHARED $<TARGET_OBJECTS:ssl-objects>) 54 add_library(ssl-shared SHARED $<TARGET_OBJECTS:ssl-objects>)
55 if (WIN32) 55 if (WIN32)
56 target_sources(ssl-shared PRIVATE
57 ${CMAKE_CURRENT_SOURCE_DIR}/ssl.def)
56 target_link_libraries(ssl-shared crypto-shared Ws2_32.lib) 58 target_link_libraries(ssl-shared crypto-shared Ws2_32.lib)
57 set(SSL_POSTFIX -${SSL_MAJOR_VERSION}) 59 set(SSL_POSTFIX -${SSL_MAJOR_VERSION})
58 endif() 60 endif()
59 set_target_properties(ssl-shared PROPERTIES 61 set_target_properties(ssl-shared PROPERTIES
60 OUTPUT_NAME ssl${SSL_POSTFIX} ARCHIVE_OUTPUT_NAME ssl) 62 OUTPUT_NAME ssl${SSL_POSTFIX}
63 ARCHIVE_OUTPUT_NAME ssl${SSL_POSTFIX})
61 set_target_properties(ssl-shared PROPERTIES VERSION ${SSL_VERSION} 64 set_target_properties(ssl-shared PROPERTIES VERSION ${SSL_VERSION}
62 SOVERSION ${SSL_MAJOR_VERSION}) 65 SOVERSION ${SSL_MAJOR_VERSION})
63 install(TARGETS ssl ssl-shared DESTINATION lib) 66 install(TARGETS ssl ssl-shared DESTINATION lib)