#4506 Deployment : Add option to control bundling of OpenSSL

Added RESINSIGHT_BUNDLE_OPENSSL
This commit is contained in:
Magne Sjaastad 2019-06-27 11:31:36 +02:00
parent 1e748d09f6
commit 37043b36af

View File

@ -668,16 +668,19 @@ if (RESINSIGHT_PRIVATE_INSTALL)
endif()
# OpenSSL
find_package(OpenSSL)
if (OPENSSL_FOUND)
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
SET(OPENSSL_BIN_DIR ${OPENSSL_INCLUDE_DIR})
string(REPLACE "include" "bin" OPENSSL_BIN_DIR ${OPENSSL_BIN_DIR})
message("OpenSSL binary dir: ${OPENSSL_BIN_DIR}")
option(RESINSIGHT_BUNDLE_OPENSSL "Bundle the OpenSSL binary DLLs" OFF)
if (RESINSIGHT_BUNDLE_OPENSSL)
find_package(OpenSSL)
if (OPENSSL_FOUND)
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
SET(OPENSSL_BIN_DIR ${OPENSSL_INCLUDE_DIR})
string(REPLACE "include" "bin" OPENSSL_BIN_DIR ${OPENSSL_BIN_DIR})
message("OpenSSL binary dir: ${OPENSSL_BIN_DIR}")
install(FILES ${OPENSSL_BIN_DIR}/libeay32.dll DESTINATION ${RESINSIGHT_INSTALL_FOLDER})
install(FILES ${OPENSSL_BIN_DIR}/ssleay32.dll DESTINATION ${RESINSIGHT_INSTALL_FOLDER})
endif(OPENSSL_FOUND)
install(FILES ${OPENSSL_BIN_DIR}/libeay32.dll DESTINATION ${RESINSIGHT_INSTALL_FOLDER})
install(FILES ${OPENSSL_BIN_DIR}/ssleay32.dll DESTINATION ${RESINSIGHT_INSTALL_FOLDER})
endif(OPENSSL_FOUND)
endif(RESINSIGHT_BUNDLE_OPENSSL)
# CRT
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP ON)