From 9a4d22128474375f530388d33cc22e008498c83a Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Mon, 19 Aug 2024 16:52:26 +0200 Subject: [PATCH] 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 --- cmake/QtSortModuleDependencies.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/QtSortModuleDependencies.cmake b/cmake/QtSortModuleDependencies.cmake index 2f8cdb59..6bad58e1 100644 --- a/cmake/QtSortModuleDependencies.cmake +++ b/cmake/QtSortModuleDependencies.cmake @@ -5,6 +5,7 @@ # in the QT_BUILD_SUBMODULES variable. The resulting list preserves the required build order. # Usage: # cmake [-DQT_BUILD_SUBMODULES=""] [-BUILD_=] \ +# [-DSEPARATOR=] \ # -P /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}")