From 966c2a46027411c000fabaee6173fc2a6e3994a1 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Wed, 5 Apr 2017 17:51:20 +0200 Subject: [PATCH] Fix CMake handling of openssl 1.1.0 fixes #5141 --- CMakeLists.txt | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2685c7b52..3839e5e9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -328,18 +328,27 @@ if(WIN32) if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi) file(SHA256 ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi NSCP_SHA256SUM) endif() - + if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi OR NOT ${NSCP_SHA256SUM} STREQUAL ${NSCP_SHA256}) file(DOWNLOAD ${NSCP_URL} ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi SHOW_PROGRESS) endif() install(FILES ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi DESTINATION ${CMAKE_INSTALL_SBINDIR}) - install( - PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} - ${OPENSSL_INCLUDE_DIR}/../bin/libeay32.dll ${OPENSSL_INCLUDE_DIR}/../bin/ssleay32.dll - DESTINATION ${CMAKE_INSTALL_SBINDIR} - ) + if (OPENSSL_VERSION_MINOR GREATER_EQUAL 1) + install( + PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} + ${OPENSSL_INCLUDE_DIR}/../bin/libcrypto-1_1.dll ${OPENSSL_INCLUDE_DIR}/../bin/libssl-1_1.dll + DESTINATION ${CMAKE_INSTALL_SBINDIR} + ) + else() + install( + PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} + ${OPENSSL_INCLUDE_DIR}/../bin/libeay32.dll ${OPENSSL_INCLUDE_DIR}/../bin/ssleay32.dll + DESTINATION ${CMAKE_INSTALL_SBINDIR} + ) + endif() + endif() include(CPack)