summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2024-01-25 11:12:14 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2024-03-20 10:07:21 +0100
commitdc9c67c260617f5b11f4e11d61ba454f5d12bd6b (patch)
treef997a12f70e69eae0faec5235ef47fd60849543f /cmake
parent3924c945d17931703cab58fd6f928a6ceda18d35 (diff)
Allow filtering modules that will use pre-built tools
Add the support for QT_INTERNAL_FORCE_FIND_HOST_TOOLS_MODULE_LIST argument which allows to set the list of tool targets that should not build their tools if QT_FORCE_FIND_TOOLS is set to ON. This mechanism doesn't work when crosscompiling. Change-Id: I597ed766cc741cacf9cb73dd8dd255644c4c9e66 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtToolHelpers.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/QtToolHelpers.cmake b/cmake/QtToolHelpers.cmake
index 95749451ae..7dd507c0ee 100644
--- a/cmake/QtToolHelpers.cmake
+++ b/cmake/QtToolHelpers.cmake
@@ -563,6 +563,15 @@ function(qt_internal_find_tool out_var target_name tools_target)
" (QT_WILL_BUILD_TOOLS is ${QT_WILL_BUILD_TOOLS}).")
endif()
+ if(NOT CMAKE_CROSSCOMPILING)
+ if(QT_INTERNAL_FORCE_FIND_HOST_TOOLS_MODULE_LIST AND
+ NOT "${tools_target}" IN_LIST QT_INTERNAL_FORCE_FIND_HOST_TOOLS_MODULE_LIST)
+ message(STATUS "Tool '${full_name}' will be built from source.")
+ set(${out_var} "TRUE" PARENT_SCOPE)
+ return()
+ endif()
+ endif()
+
if(QT_WILL_RENAME_TOOL_TARGETS AND (name STREQUAL target_name))
message(FATAL_ERROR
"qt_internal_add_tool must be passed a target obtained from qt_get_tool_target_name.")