qt5base-lts/cmake/qt.toolchain.cmake.in
Samuli Piippo 963017f588 Prepend prefix path after loading toolchain file
The original toolchain file may set CMAKE_FIND_ROOT_PATH instead of
appending it, which overrides the Qt's path.

Change-Id: I69a4bf4be6a999854bb8a84cf5032c6a9b739b2e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-28 08:31:34 +02:00

21 lines
462 B
CMake

@init_platform@
@init_qt_host_path@
@init_original_toolchain_file@
@init_vcpkg@
if(qt_chainload_toolchain_file)
include("${qt_chainload_toolchain_file}")
unset(qt_chainload_toolchain_file)
endif()
list(PREPEND CMAKE_PREFIX_PATH "@CMAKE_INSTALL_PREFIX@")
list(PREPEND CMAKE_FIND_ROOT_PATH "@CMAKE_INSTALL_PREFIX@")
if(QT_HOST_PATH)
list(APPEND CMAKE_PREFIX_PATH "${QT_HOST_PATH}")
list(APPEND CMAKE_FIND_ROOT_PATH "${QT_HOST_PATH}")
endif()