diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-09-07 17:48:56 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-09-09 18:52:50 +0200 |
commit | a6a3b82ffb3d7f1ea13293206401ed360a51e9cd (patch) | |
tree | a84990ed8db7502e1276f1e2ce1e60cb959fa4ee /cmake/qt.toolchain.cmake.in | |
parent | 948f2a9cac0924a2e39a44795b8357b3d768139e (diff) |
CMake: Make generated Qt toolchain file a bit more relocatable
Rather than force setting the apple sysroot and Qt host paths, first
check if they are not already defined on the command line and if they
aren't, check that the paths with which Qt was configured exist.
The goal of the patch is to not set invalid paths, like when using a
Qt built in the CI, which will have a different host path / sysroot
compared to what a user has locally.
Task-number: QTBUG-85240
Change-Id: Ic37566b4fa845d8d1b4e4b5ba7fa4be769e99ca8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'cmake/qt.toolchain.cmake.in')
-rw-r--r-- | cmake/qt.toolchain.cmake.in | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/cmake/qt.toolchain.cmake.in b/cmake/qt.toolchain.cmake.in index c4884e9dfa..8a2db98f28 100644 --- a/cmake/qt.toolchain.cmake.in +++ b/cmake/qt.toolchain.cmake.in @@ -2,11 +2,8 @@ @init_qt_host_path@ @init_qt_host_path_cmake_dir@ - @init_original_toolchain_file@ - @init_vcpkg@ - if(__qt_chainload_toolchain_file) get_filename_component(__qt_chainload_toolchain_file_real_path "${__qt_chainload_toolchain_file}" REALPATH) @@ -40,4 +37,3 @@ get_filename_component(QT_TOOLCHAIN_RELOCATABLE_CMAKE_DIR "${CMAKE_CURRENT_LIST_ # Qt install prefix, and the prefix path to the lib/cmake subdir. list(PREPEND CMAKE_PREFIX_PATH "${QT_TOOLCHAIN_RELOCATABLE_CMAKE_DIR}") list(PREPEND CMAKE_FIND_ROOT_PATH "${QT_TOOLCHAIN_RELOCATABLE_INSTALL_PREFIX}") - |