summaryrefslogtreecommitdiffstats
path: root/cmake/QtBaseGlobalTargets.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-09-15 11:51:59 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-09-15 15:55:47 +0200
commite957e9c28ffc490b27f569e2b24b007a586c76f0 (patch)
tree4a03f5cedb27b37d38285d5166996e7b0931f385 /cmake/QtBaseGlobalTargets.cmake
parent9ce8281417d939628e4e2a725225e504efbe031c (diff)
CMake: Fix incorrect host path used in generated toolchain file
A previous change accidentally broke what we we set for QT_HOST_PATH and QT_HOST_PATH_CMAKE_DIR. The QT_HOST_PATH variable should use an absolute path as it was done before. The QT_HOST_PATH_CMAKE_DIR variable incorrectly used the value of "${QT_HOST_PATH}" instead of "${QT_HOST_PATH_CMAKE_DIR}". Fix both of these, and change the names of intermediate variables to be consistent. Amends a6a3b82ffb3d7f1ea13293206401ed360a51e9cd Task-number: QTBUG-85240 Change-Id: I328a7edee12a13ff793684e8a0a4c2e03204eca4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtBaseGlobalTargets.cmake')
-rw-r--r--cmake/QtBaseGlobalTargets.cmake10
1 files changed, 6 insertions, 4 deletions
diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake
index de3c1af434..b482c3079f 100644
--- a/cmake/QtBaseGlobalTargets.cmake
+++ b/cmake/QtBaseGlobalTargets.cmake
@@ -92,18 +92,20 @@ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
# Generate toolchain file for convenience
if(QT_HOST_PATH)
- get_filename_component(init_qt_host_path "${QT_HOST_PATH}" ABSOLUTE)
# TODO: Figure out how to make these relocatable.
+
+ get_filename_component(__qt_host_path_absolute "${QT_HOST_PATH}" ABSOLUTE)
set(init_qt_host_path "
-set(__qt_initial_qt_host_path \"${QT_HOST_PATH}\")
+set(__qt_initial_qt_host_path \"${__qt_host_path_absolute}\")
if(NOT DEFINED QT_HOST_PATH AND EXISTS \"\${__qt_initial_qt_host_path}\")
set(QT_HOST_PATH \"\${__qt_initial_qt_host_path}\" CACHE PATH \"\" FORCE)
endif()")
- get_filename_component(QT_HOST_PATH_CMAKE_DIR
+
+ get_filename_component(__qt_host_path_cmake_dir_absolute
"${Qt${PROJECT_VERSION_MAJOR}HostInfo_DIR}/.." ABSOLUTE)
set(init_qt_host_path_cmake_dir
"
-set(__qt_initial_qt_host_path_cmake_dir \"${QT_HOST_PATH}\")
+set(__qt_initial_qt_host_path_cmake_dir \"${__qt_host_path_cmake_dir_absolute}\")
if(NOT DEFINED QT_HOST_PATH_CMAKE_DIR AND EXISTS \"\${__qt_initial_qt_host_path_cmake_dir}\")
set(QT_HOST_PATH_CMAKE_DIR \"\${__qt_initial_qt_host_path_cmake_dir}\" CACHE PATH \"\" FORCE)
endif()")