From acfbe3b7795c741b269fc23ed2c51c5937cd7f4f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 10 Jan 2022 10:12:32 -0800 Subject: 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 Reviewed-by: Alexandru Croitor Reviewed-by: Thiago Macieira --- cmake/QtSetup.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake/QtSetup.cmake') 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." -- cgit v1.2.3