mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 10:37:35 +02:00
Merge pull request #7245 from birarda/domain-security
manually install OpenSSL DLLs for Qt
This commit is contained in:
commit
f21815e332
4 changed files with 48 additions and 0 deletions
|
@ -64,5 +64,10 @@ macro(install_beside_console)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# set variables used by manual ssleay library copy
|
||||||
|
set(TARGET_INSTALL_DIR ${COMPONENT_INSTALL_DIR})
|
||||||
|
set(TARGET_INSTALL_COMPONENT ${SERVER_COMPONENT})
|
||||||
|
manually_install_openssl_for_qt()
|
||||||
|
|
||||||
endif ()
|
endif ()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
34
cmake/macros/ManuallyInstallOpenSSLForQt.cmake
Normal file
34
cmake/macros/ManuallyInstallOpenSSLForQt.cmake
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#
|
||||||
|
# ManuallyInstallOpenSSLforQt.cmake
|
||||||
|
#
|
||||||
|
# Created by Stephen Birarda on 1/15/16.
|
||||||
|
# Copyright 2014 High Fidelity, Inc.
|
||||||
|
#
|
||||||
|
# Distributed under the Apache License, Version 2.0.
|
||||||
|
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
#
|
||||||
|
|
||||||
|
macro(manually_install_openssl_for_qt)
|
||||||
|
|
||||||
|
# Qt dynamically links OpenSSL if it can find it on the user's machine
|
||||||
|
# We want to avoid it being found somewhere random and have it not being a compatible version
|
||||||
|
# So even though we don't need the dynamic version of OpenSSL for our direct-use purposes
|
||||||
|
# we use this macro to include the two SSL DLLs with the targets using QtNetwork
|
||||||
|
if (WIN32)
|
||||||
|
# we have to call find_package(OpenSSL) here even though this target may not directly need it
|
||||||
|
find_package(OpenSSL REQUIRED)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES "${OPENSSL_DLL_PATH}/ssleay32.dll"
|
||||||
|
DESTINATION ${TARGET_INSTALL_DIR}
|
||||||
|
COMPONENT ${TARGET_INSTALL_COMPONENT}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES "${OPENSSL_DLL_PATH}/libeay32.dll"
|
||||||
|
DESTINATION ${TARGET_INSTALL_DIR}
|
||||||
|
COMPONENT ${TARGET_INSTALL_COMPONENT}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endmacro()
|
|
@ -107,6 +107,8 @@ if (WIN32 AND NOT CYGWIN)
|
||||||
select_library_configurations(SSL_EAY)
|
select_library_configurations(SSL_EAY)
|
||||||
|
|
||||||
set(OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY})
|
set(OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY})
|
||||||
|
|
||||||
|
find_path(OPENSSL_DLL_PATH NAMES ssleay32.dll PATH_SUFFIXES "bin" ${_OPENSSL_ROOT_HINTS_AND_PATHS})
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
|
||||||
|
@ -198,6 +200,9 @@ endif ()
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
set(OPENSSL_REQUIREMENTS OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR)
|
set(OPENSSL_REQUIREMENTS OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR)
|
||||||
|
if (WIN32)
|
||||||
|
list(APPEND OPENSSL_REQUIREMENTS OPENSSL_DLL_PATH)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (OPENSSL_VERSION)
|
if (OPENSSL_VERSION)
|
||||||
find_package_handle_standard_args(OpenSSL
|
find_package_handle_standard_args(OpenSSL
|
||||||
|
|
|
@ -266,5 +266,9 @@ add_bugsplat()
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(EXTRA_DEPLOY_OPTIONS "--qmldir ${PROJECT_SOURCE_DIR}/resources/qml")
|
set(EXTRA_DEPLOY_OPTIONS "--qmldir ${PROJECT_SOURCE_DIR}/resources/qml")
|
||||||
|
|
||||||
|
set(TARGET_INSTALL_DIR ${INTERFACE_INSTALL_DIR})
|
||||||
|
set(TARGET_INSTALL_COMPONENT ${CLIENT_COMPONENT})
|
||||||
|
manually_install_openssl_for_qt()
|
||||||
|
|
||||||
package_libraries_for_deployment()
|
package_libraries_for_deployment()
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue