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:
@@ -7,11 +7,15 @@
|
||||
ECMFindQmlModule
|
||||
----------------
|
||||
|
||||
Find QML import modules through a ``find_qmlmodule()`` call.
|
||||
It looks for the qmldir and uses the qmlplugindump if needed application to find the plugins and sets them up as
|
||||
runtime dependencies.
|
||||
This is useful so that when we configure a project we are notified when some
|
||||
QML imports are not present in the system.
|
||||
Finds QML import modules to set them as dependencies.
|
||||
|
||||
Because QML modules are not hard compile time requirements, they can be easy to miss
|
||||
by packagers and developers, causing suboptimal build results or runtime issues.
|
||||
Use this CMake module to ensure a QML module is installed at compile time
|
||||
during CMake configuration.
|
||||
|
||||
Internally, this CMake module looks for the qmldir and, if needed, uses
|
||||
qmlplugindump to find the plugins and set them up as dependencies.
|
||||
|
||||
::
|
||||
|
||||
@@ -32,6 +36,8 @@ Usage example:
|
||||
Since 5.38.0.
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_policy(VERSION 3.16)
|
||||
|
||||
set(MODULES_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
function(ecm_find_qmlmodule MODULE_NAME)
|
||||
@@ -40,7 +46,7 @@ function(ecm_find_qmlmodule MODULE_NAME)
|
||||
if (ARG_UNPARSED_ARGUMENTS)
|
||||
list(GET ARG_UNPARSED_ARGUMENTS 0 VERSION) # If we have any unparsed args, that should be the version
|
||||
endif()
|
||||
set(ARGN "") # The find_package call below should not recieve arguments in KF6
|
||||
set(ARGN "") # The find_package call below should not receive arguments in KF6
|
||||
else()
|
||||
list(GET ARGN 0 VERSION)
|
||||
list(REMOVE_AT ARGN 0)
|
||||
@@ -54,11 +60,9 @@ function(ecm_find_qmlmodule MODULE_NAME)
|
||||
if(COMMAND set_package_properties)
|
||||
if (ARG_REQUIRED)
|
||||
set(TYPE_STRING TYPE REQUIRED)
|
||||
else()
|
||||
set(TYPE_STRING TYPE RUNTIME)
|
||||
endif()
|
||||
set_package_properties(${GENMODULE} PROPERTIES
|
||||
DESCRIPTION "QML module '${MODULE_NAME}' is a runtime dependency."
|
||||
DESCRIPTION "QML module '${MODULE_NAME}' is a dependency."
|
||||
${TYPE_STRING})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user