summaryrefslogtreecommitdiffstats
path: root/cmake/QtPostProcessHelpers.cmake
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-01-10 10:12:32 -0800
committerJoerg Bornemann <joerg.bornemann@qt.io>2022-05-04 15:20:35 +0200
commitacfbe3b7795c741b269fc23ed2c51c5937cd7f4f (patch)
tree9c54ea5272d1c0ddc8e162a1d09f6b42ee90987d /cmake/QtPostProcessHelpers.cmake
parent634717135da2e8130e1677176c83ece478f1d87f (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/QtPostProcessHelpers.cmake')
-rw-r--r--cmake/QtPostProcessHelpers.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake
index 16e7b25287..5054bd44d4 100644
--- a/cmake/QtPostProcessHelpers.cmake
+++ b/cmake/QtPostProcessHelpers.cmake
@@ -592,9 +592,14 @@ endif()\n")
"set(QT_UIKIT_SDK \"${QT_UIKIT_SDK}\" CACHE BOOL \"\")\n")
endif()
- if(CMAKE_CROSSCOMPILING AND QT_BUILD_TOOLS_WHEN_CROSSCOMPILING)
+ if(QT_FORCE_FIND_TOOLS)
string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
- "set(QT_BUILD_TOOLS_WHEN_CROSSCOMPILING \"TRUE\" CACHE BOOL \"\" FORCE)\n")
+ "set(QT_FORCE_FIND_TOOLS \"TRUE\" CACHE BOOL \"\" FORCE)\n")
+ endif()
+
+ if(QT_FORCE_BUILD_TOOLS)
+ string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
+ "set(QT_FORCE_BUILD_TOOLS \"TRUE\" CACHE BOOL \"\" FORCE)\n")
endif()
if(QT_INTERNAL_EXAMPLES_INSTALL_PREFIX)