kde/kf6-extra-cmake-modules: rebase to 6.28.0 (ECM) + teach version parser set(VERSION)

kf6-kcoreaddons 6.28.0 requires ECM >= 6.28.0 but the vendored ECM source/ was
still 6.10.0: the sync engine skipped it because ECM's version marker is a bare
set(VERSION "X.Y.Z") that the parser didn't recognize (only KF_VERSION /
PROJECT_VERSION / RELEASE_SERVICE_VERSION). Re-lay ECM from its 6.28.0 source.tar
(pure cmake modules, no Redox port) and teach both the sync engine and the
validator to read set(VERSION) so this class is caught, not silently skipped.
This commit is contained in:
2026-08-01 08:07:00 +03:00
parent 1488226b91
commit e0590a0b56
151 changed files with 1654 additions and 554 deletions
@@ -5,9 +5,9 @@
# Qt 6 implementation of ECMQmlModule
set(QT_NO_CREATE_VERSIONLESS_FUNCTIONS ON)
cmake_policy(VERSION 3.16)
find_package(Qt6 COMPONENTS Core Qml CONFIG)
unset(QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
if (NOT TARGET Qt6::Qml)
message(WARNING "Target Qt6::Qml was not found. ECMQmlModule requires the QML module when building with Qt 6")
@@ -23,6 +23,19 @@ endif()
# Stop warning about a changed import prefix.
qt6_policy(SET QTP0001 NEW)
option(ECM_QMLCACHE_UNITY_BUILD "Perform unity builds for source files produced by qmlcachegen." OFF)
# Internal, puts all qmlcachegen cpp source files into the same unity build group
function(_ecm_qml_module_setup_unity_group ARG_TARGET)
get_target_property(_sources ${ARG_TARGET} SOURCES)
foreach(_src ${_sources})
string(REGEX MATCH "\\.rcc/qmlcache/" _is_qmlcache ${_src})
if (_is_qmlcache)
set_source_files_properties(${_src} PROPERTIES UNITY_GROUP "qmlcache")
endif()
endforeach()
endfunction()
function(ecm_add_qml_module ARG_TARGET)
cmake_parse_arguments(PARSE_ARGV 1 ARG "NO_PLUGIN;QT_NO_PLUGIN;GENERATE_PLUGIN_SOURCE" "URI;VERSION;CLASSNAME;OUTPUT_TARGETS" "")
@@ -60,7 +73,7 @@ function(ecm_add_qml_module ARG_TARGET)
endif()
if (NOT ARG_GENERATE_PLUGIN_SOURCE)
list(APPEND _arguments NO_GENERATE_PLUGIN_SOURCE)
list(APPEND _arguments NO_GENERATE_PLUGIN_SOURCE NO_PLUGIN_OPTIONAL)
endif()
if (NOT TARGET ${ARG_TARGET})
@@ -107,6 +120,9 @@ function(ecm_add_qml_module ARG_TARGET)
)
endif()
_ecm_qml_module_setup_unity_group(${ARG_TARGET})
set_target_properties(${ARG_TARGET} PROPERTIES UNITY_BUILD_MODE GROUP)
set_target_properties(${ARG_TARGET} PROPERTIES UNITY_BUILD ${ECM_QMLCACHE_UNITY_BUILD})
endfunction()
function(ecm_add_qml_module_dependencies ARG_TARGET)
@@ -159,6 +175,7 @@ function(ecm_target_qml_sources ARG_TARGET)
list(APPEND _ecm_output_targets ${_out_targets})
set_target_properties(${ARG_TARGET} PROPERTIES _ecm_output_targets "${_ecm_output_targets}")
_ecm_qml_module_setup_unity_group(${ARG_TARGET})
endfunction()
function(ecm_finalize_qml_module ARG_TARGET)