diff options
author | Eike Ziller <eike.ziller@qt.io> | 2024-03-13 11:37:48 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2024-03-13 17:19:07 +0000 |
commit | cdad61d08a8ef3f02cdc3b11275b4dee461b9e8f (patch) | |
tree | 56de2afab5a2f0f56e3050b8f2385198fc96703e | |
parent | e604f285e8b7ba496cc62da7f4a65106b6240946 (diff) |
QmlDesigner: Add optional dependency on LicenseChecker
It is important that the LicenseChecker's initialization (if that is
available) happens before QmlDesigner's, so add an optional dependency
to reflect that.
Add a PLUGIN_MANUAL_DEPENDS option to add_qtc_plugin, which explicitly
specifies the name, version and type. The existing PLUGIN_RECOMMENDS
requires the plugin target to exist to extract the plugin's version.
Change-Id: Ie2cf84e75964ce91ed8bbcdbeee9fa9770bed641
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r-- | cmake/QtCreatorAPI.cmake | 17 | ||||
-rw-r--r-- | src/plugins/qmldesigner/CMakeLists.txt | 1 |
2 files changed, 17 insertions, 1 deletions
diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index 5cbd9cd4bf..c27d24b43a 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -330,7 +330,7 @@ function(add_qtc_plugin target_name) cmake_parse_arguments(_arg "SKIP_INSTALL;INTERNAL_ONLY;SKIP_TRANSLATION;EXPORT;SKIP_PCH" "VERSION;COMPAT_VERSION;PLUGIN_PATH;PLUGIN_NAME;OUTPUT_NAME;BUILD_DEFAULT;PLUGIN_CLASS" - "CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;SYSTEM_INCLUDES;PUBLIC_INCLUDES;PUBLIC_SYSTEM_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PLUGIN_DEPENDS;PLUGIN_RECOMMENDS;PLUGIN_TEST_DEPENDS;PROPERTIES" + "CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;SYSTEM_INCLUDES;PUBLIC_INCLUDES;PUBLIC_SYSTEM_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PLUGIN_DEPENDS;PLUGIN_RECOMMENDS;PLUGIN_TEST_DEPENDS;PLUGIN_MANUAL_DEPENDS;PROPERTIES" ${ARGN} ) @@ -421,6 +421,21 @@ function(add_qtc_plugin target_name) " { \"Name\" : \"${i}\", \"Version\" : \"${_v}\", \"Type\" : \"test\" }" ) endforeach(i) + list(LENGTH _arg_PLUGIN_MANUAL_DEPENDS manualdep_len) + math(EXPR manualdep_maxindex "${manualdep_len}-1") + if(manualdep_len GREATER 0) + # three items per entry: name, version, typeofdependency + foreach (i RANGE 0 ${manualdep_maxindex} 3) + math(EXPR dep_version_i "${i} + 1") + math(EXPR dep_type_i "${i} + 2") + list(GET _arg_PLUGIN_MANUAL_DEPENDS ${i} dep_name) + list(GET _arg_PLUGIN_MANUAL_DEPENDS ${dep_version_i} dep_version) + list(GET _arg_PLUGIN_MANUAL_DEPENDS ${dep_type_i} dep_type) + string(APPEND _arg_DEPENDENCY_STRING + " { \"Name\" : \"${dep_name}\", \"Version\" : \"${dep_version}\", \"Type\" : \"${dep_type}\" }" + ) + endforeach() + endif() string(REPLACE "} {" "},\n {" _arg_DEPENDENCY_STRING "${_arg_DEPENDENCY_STRING}" diff --git a/src/plugins/qmldesigner/CMakeLists.txt b/src/plugins/qmldesigner/CMakeLists.txt index 7bfea271e5..2e29b8dda8 100644 --- a/src/plugins/qmldesigner/CMakeLists.txt +++ b/src/plugins/qmldesigner/CMakeLists.txt @@ -478,6 +478,7 @@ add_qtc_plugin(QmlDesigner PLUGIN_DEPENDS Core ProjectExplorer QmlDesignerBase QmlJSEditor QmakeProjectManager QmlProjectManager QtSupport + PLUGIN_MANUAL_DEPENDS LicenseChecker ${IDE_VERSION} optional DEPENDS QmlJS LanguageUtils QmlEditorWidgets AdvancedDockingSystem Qt::QuickWidgets Qt::CorePrivate Qt::Xml Qt::Svg QmlDesignerCore Sqlite |