diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-01-10 10:12:32 -0800 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-05-04 15:20:35 +0200 |
commit | acfbe3b7795c741b269fc23ed2c51c5937cd7f4f (patch) | |
tree | 9c54ea5272d1c0ddc8e162a1d09f6b42ee90987d /cmake/QtSetup.cmake | |
parent | 634717135da2e8130e1677176c83ece478f1d87f (diff) |
CMake: also allow building tools when found elsewhere in host builds
Previously, this was only supported when cross-compiling, but that's an
unnecessary limitation. Instead, make it possible to build the "host"
tools (notably qmake) even when they've been found elsewhere due to
QT_FORCE_FIND_TOOLS=ON and a supplied QT_HOST_PATH.
The combination of QT_FORCE_FIND_TOOLS and QT_FORCE_BUILD_TOOLS set to
ON is useful for developers who touch content that ends up in the
bootstrap library.
QT_BUILD_TOOLS_WHEN_CROSSCOMPILING is deprecated in favor of
QT_FORCE_BUILD_TOOLS.
[ChangeLog][CMake] QT_BUILD_TOOLS_WHEN_CROSSCOMPILING has been
deprecated in favor of QT_FORCE_BUILD_TOOLS. The latter can be used in
combination with QT_FORCE_FIND_TOOLS and QT_HOST_PATH to use tools from
a host Qt even for a non-cross build and still build the tools.
Fixes: QTBUG-99683
Change-Id: I0e5f6bec596a4a78bd3bfffd16c8fb486181f9b6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'cmake/QtSetup.cmake')
-rw-r--r-- | cmake/QtSetup.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake index ebcc4c408a..1c3f03318f 100644 --- a/cmake/QtSetup.cmake +++ b/cmake/QtSetup.cmake @@ -216,7 +216,7 @@ set(BUILD_TESTING ${QT_BUILD_TESTS} CACHE INTERNAL "") # Like in qttools/assistant/assistant.pro, load(qt_app), which is guarded by a qtNomakeTools() call. set(_qt_build_tools_by_default_default ON) -if(CMAKE_CROSSCOMPILING AND NOT QT_BUILD_TOOLS_WHEN_CROSSCOMPILING) +if(CMAKE_CROSSCOMPILING AND NOT QT_FORCE_BUILD_TOOLS) set(_qt_build_tools_by_default_default OFF) endif() option(QT_BUILD_TOOLS_BY_DEFAULT "Should tools be built as part of the default 'all' target." |