diff options
author | Brad King <brad.king@kitware.com> | 2014-11-03 18:44:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-11-10 15:13:38 (GMT) |
commit | 54cb23c657045c339a1a6060ea19d3a74a1c817b (patch) | |
tree | 273bdb313013a318a0150036128b98db83f89041 /Utilities | |
parent | c50f03275481e3e1434b5c3153d8668dde6cefd8 (diff) | |
download | CMake-54cb23c657045c339a1a6060ea19d3a74a1c817b.zip CMake-54cb23c657045c339a1a6060ea19d3a74a1c817b.tar.gz CMake-54cb23c657045c339a1a6060ea19d3a74a1c817b.tar.bz2 |
curl: Restore installation of OpenSSL DLLs
Restore logic originally added by commit v2.8.10~119^2~1 (curl: Make
OpenSSL DLLs available to CMake on Windows, 2012-09-06).
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmcurl/lib/CMakeLists.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Utilities/cmcurl/lib/CMakeLists.txt b/Utilities/cmcurl/lib/CMakeLists.txt index 6188ddb..a4621c1 100644 --- a/Utilities/cmcurl/lib/CMakeLists.txt +++ b/Utilities/cmcurl/lib/CMakeLists.txt @@ -88,10 +88,35 @@ else() set(CURL_USER_DEFINED_DYNAMIC_OR_STATIC SHARED) endif() +# For windows we want to install OPENSSL_LIBRARIES dlls +# and also copy them into the build tree so that testing +# can find them. +if(CMAKE_USE_OPENSSL AND OPENSSL_FOUND AND WIN32) + find_file(CMAKE_EAY_DLL NAME libeay32.dll HINTS ${OPENSSL_INCLUDE_DIR}/..) + find_file(CMAKE_SSL_DLL NAME ssleay32.dll HINTS ${OPENSSL_INCLUDE_DIR}/..) + mark_as_advanced(CMAKE_EAY_DLL CMAKE_SSL_DLL) + if(CMAKE_SSL_DLL AND CMAKE_EAY_DLL) + set(CMAKE_CURL_SSL_DLLS ${CMake_BIN_DIR}/${CMAKE_CFG_INTDIR}/libeay32.dll + ${CMake_BIN_DIR}/${CMAKE_CFG_INTDIR}/ssleay32.dll) + add_custom_command(OUTPUT + ${CMake_BIN_DIR}/${CMAKE_CFG_INTDIR}/libeay32.dll + DEPENDS ${CMAKE_EAY_DLL} + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_EAY_DLL} + ${CMake_BIN_DIR}/${CMAKE_CFG_INTDIR}/libeay32.dll) + add_custom_command(OUTPUT + ${CMake_BIN_DIR}/${CMAKE_CFG_INTDIR}/ssleay32.dll + DEPENDS ${CMAKE_SSL_DLL} + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SSL_DLL} + ${CMake_BIN_DIR}/${CMAKE_CFG_INTDIR}/ssleay32.dll) + install(PROGRAMS ${CMAKE_EAY_DLL} ${CMAKE_SSL_DLL} DESTINATION bin) + endif() +endif() + add_library( ${LIB_NAME} ${CURL_USER_DEFINED_DYNAMIC_OR_STATIC} ${HHEADERS} ${CSOURCES} + ${CMAKE_CURL_SSL_DLLS} ) target_link_libraries(${LIB_NAME} ${CURL_LIBS}) |