summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-06-04 17:10:51 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-06-08 18:25:52 +0200
commitfffaffb439403d19331894cc89fefe742c4deb51 (patch)
treeea5b99cd8dc82b0424f2d43bb17e4b7b5d9038be /cmake
parent2d9c9ab874e61dd9a5bc9830285cab6bb8a82cd3 (diff)
CMake: Save OPENSSL_ROOT_DIR in QtBuildInternalsExtra
This is needed so that other repos other than qtbase (like qtopcua) can still find_package(WrapOpenSSL) successfully. The path needs to be converted to a CMake path, to avoid issues on Windows with backslashes. Change-Id: I3d7652d93110f6b8f39a58a6c28aef6c7471aea7 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtPostProcess.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/QtPostProcess.cmake b/cmake/QtPostProcess.cmake
index 02ab986a3d..feb20a50cd 100644
--- a/cmake/QtPostProcess.cmake
+++ b/cmake/QtPostProcess.cmake
@@ -423,6 +423,16 @@ endif()\n")
"set(QT_EXTRA_RPATHS \"${QT_EXTRA_RPATHS}\" CACHE STRING \"\")\n")
endif()
+ # The OpenSSL root dir needs to be saved so that repos other than qtbase (like qtopcua) can
+ # still successfully find_package(WrapOpenSSL) in the CI.
+ # qmake saves any additional include paths passed via the configure like '-I/foo'
+ # in mkspecs/qmodule.pri, so this file is the closest equivalent.
+ if(DEFINED OPENSSL_ROOT_DIR)
+ file(TO_CMAKE_PATH "${OPENSSL_ROOT_DIR}" openssl_root_cmake_path)
+ string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
+ "set(OPENSSL_ROOT_DIR \"${openssl_root_cmake_path}\" CACHE STRING \"\")\n")
+ endif()
+
qt_generate_install_prefixes(install_prefix_content)
string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS "${install_prefix_content}")