diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-05-05 16:01:15 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-05-10 11:28:52 +0200 |
commit | c457e65bf40a8cccff283609924078b5ff985709 (patch) | |
tree | 58fb52ead16101d10fdcfaaf65b6571c8ed08382 /cmake/qt.toolchain.cmake.in | |
parent | 0d8eb8a5ab436452433eae69290fe35fe28cd532 (diff) |
CMake: Don't use list(PREPEND) in qt.toolchain.cmake
list(PREPEND) command was added in CMake 3.15+, but so far we claim
support for CMake 3.14 in user projects.
Use set command instead.
This is not the only place where we use list PREPEND in public API,
but it's the first immediate issue that comes up when using CMake
3.14.
Amends 963017f58884dfd929249c5546aadbb0f74501e8
Pick-to: 6.1
Change-Id: I7ba4507fc7da2dc550317848751502b8b46c298c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/qt.toolchain.cmake.in')
-rw-r--r-- | cmake/qt.toolchain.cmake.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmake/qt.toolchain.cmake.in b/cmake/qt.toolchain.cmake.in index cdd2813f8b..49553c9bbf 100644 --- a/cmake/qt.toolchain.cmake.in +++ b/cmake/qt.toolchain.cmake.in @@ -63,8 +63,9 @@ get_filename_component(QT_TOOLCHAIN_RELOCATABLE_CMAKE_DIR "${CMAKE_CURRENT_LIST_ # Instead of collapsing the search prefix (which is the case when one is a subdir of the other), # it concatenates them creating an invalid path. Workaround it by setting the root path to the # 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}") +set(CMAKE_PREFIX_PATH "${QT_TOOLCHAIN_RELOCATABLE_CMAKE_DIR};${CMAKE_PREFIX_PATH}") +set(CMAKE_FIND_ROOT_PATH "${QT_TOOLCHAIN_RELOCATABLE_INSTALL_PREFIX};${CMAKE_FIND_ROOT_PATH}") + @init_qt_host_path_checks@ # Allow customization of the toolchain file by placing an additional file next to it. |