summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-04-16 16:31:25 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-04-19 12:42:10 +0000
commit340bd7a2fe9d1e1b188f5ed51187627638accf1a (patch)
treeb022dcceefbff558d30482dbd82c1e970ac62f6a /cmake
parent0a9711d668f7ad7b156fa4e78afb54a97243b7ef (diff)
Fix top-level build repository targets
The directory-level targets missed the first level of sub-targets. E.g. `qtbase_qmake` did not have a dependency to `qmake`. Fix qt_build_internals_get_repo_targets to first grab all targets of the subdirectory and then recurse. Change-Id: I3604000caec22fac9a4cc5f5aaf651d550d16793 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 82f8519b827ba7fd89f8168632461f47b09605a7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuildInternals/QtBuildInternalsConfig.cmake19
1 files changed, 10 insertions, 9 deletions
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
index 47f10fc337..f2d20a1bc2 100644
--- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
+++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
@@ -242,18 +242,19 @@ endmacro()
# find all targets defined in $subdir by recursing through all added subdirectories
# populates $qt_repo_targets with a ;-list of non-UTILITY targets
macro(qt_build_internals_get_repo_targets subdir)
+ get_directory_property(_targets DIRECTORY "${subdir}" BUILDSYSTEM_TARGETS)
+ if(_targets)
+ foreach(_target IN LISTS _targets)
+ get_target_property(_type ${_target} TYPE)
+ if(NOT (${_type} STREQUAL "UTILITY" OR ${_type} STREQUAL "INTERFACE"))
+ list(APPEND qt_repo_targets "${_target}")
+ endif()
+ endforeach()
+ endif()
+
get_directory_property(_directories DIRECTORY "${subdir}" SUBDIRECTORIES)
if (_directories)
foreach(_directory IN LISTS _directories)
- get_directory_property(_targets DIRECTORY "${_directory}" BUILDSYSTEM_TARGETS)
- if (_targets)
- foreach(_target IN LISTS _targets)
- get_target_property(_type ${_target} TYPE)
- if (NOT (${_type} STREQUAL "UTILITY" OR ${_type} STREQUAL "INTERFACE"))
- list(APPEND qt_repo_targets "${_target}")
- endif()
- endforeach()
- endif()
qt_build_internals_get_repo_targets("${_directory}")
endforeach()
endif()