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 963017f588
Pick-to: 6.1
Change-Id: I7ba4507fc7da2dc550317848751502b8b46c298c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
0d8eb8a5ab
commit
c457e65bf4
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user