aboutsummaryrefslogtreecommitdiff
path: root/crypto/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 /crypto/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 'crypto/CMakeLists.txt')
-rw-r--r--crypto/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
index d8453f3..e27d0ee 100644
--- a/crypto/CMakeLists.txt
+++ b/crypto/CMakeLists.txt
@@ -753,11 +753,14 @@ if (BUILD_SHARED)
753 add_library(crypto STATIC $<TARGET_OBJECTS:crypto-objects>) 753 add_library(crypto STATIC $<TARGET_OBJECTS:crypto-objects>)
754 add_library(crypto-shared SHARED $<TARGET_OBJECTS:crypto-objects>) 754 add_library(crypto-shared SHARED $<TARGET_OBJECTS:crypto-objects>)
755 if (WIN32) 755 if (WIN32)
756 target_sources(crypto-shared PRIVATE
757 ${CMAKE_CURRENT_SOURCE_DIR}/crypto.def)
756 target_link_libraries(crypto-shared crypto Ws2_32.lib) 758 target_link_libraries(crypto-shared crypto Ws2_32.lib)
757 set(CRYPTO_POSTFIX -${CRYPTO_MAJOR_VERSION}) 759 set(CRYPTO_POSTFIX -${CRYPTO_MAJOR_VERSION})
758 endif() 760 endif()
759 set_target_properties(crypto-shared PROPERTIES 761 set_target_properties(crypto-shared PROPERTIES
760 OUTPUT_NAME crypto${CRYPTO_POSTFIX} ARCHIVE_OUTPUT_NAME crypto) 762 OUTPUT_NAME crypto${CRYPTO_POSTFIX}
763 ARCHIVE_OUTPUT_NAME crypto${CRYPTO_POSTFIX})
761 set_target_properties(crypto-shared PROPERTIES VERSION 764 set_target_properties(crypto-shared PROPERTIES VERSION
762 ${CRYPTO_VERSION} SOVERSION ${CRYPTO_MAJOR_VERSION}) 765 ${CRYPTO_VERSION} SOVERSION ${CRYPTO_MAJOR_VERSION})
763 install(TARGETS crypto crypto-shared DESTINATION lib) 766 install(TARGETS crypto crypto-shared DESTINATION lib)