Add the custom separator support to QtSortModuleDependencies.cmake script

Allows to join the resulting list using ',' or something more exotic
like ' -skip'.

Change-Id: Iafffe3eaa8c14cde81c0ce05c584b43144011a3a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev 2024-08-19 16:52:26 +02:00
parent 2cf7569504
commit 9a4d221284
1 changed files with 6 additions and 1 deletions

View File

@ -5,6 +5,7 @@
# in the QT_BUILD_SUBMODULES variable. The resulting list preserves the required build order.
# Usage:
# cmake [-DQT_BUILD_SUBMODULES="<repo;..>"] [-BUILD_<repo>=<TRUE|FALSE>] \
# [-DSEPARATOR=<list separator>] \
# -P <path/to>/qt6/cmake/QtSortModuleDependencies.cmake
cmake_minimum_required(VERSION 3.16)
@ -12,5 +13,9 @@ include(${CMAKE_CURRENT_LIST_DIR}/QtTopLevelHelpers.cmake)
qt_internal_collect_modules_only(result "${QT_BUILD_SUBMODULES}")
list(JOIN result " " result)
if(NOT DEFINED SEPARATOR)
set(SEPARATOR " ")
endif()
list(JOIN result "${SEPARATOR}" result)
message("${result}")