Commit 0b996210 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Project: Deduplicate dependency resolving logic

Change-Id: I6af80600b060fa6a99704df0709461799858d41e
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
parent e747817c
......@@ -14,33 +14,27 @@ plugin_recmds = $$QTC_PLUGIN_RECOMMENDS
include(../qtcreator.pri)
# for substitution in the .json
dependencyList =
for(dep, plugin_deps) {
defineReplace(dependencyName) {
dependencies_file =
for(dir, QTC_PLUGIN_DIRS) {
exists($$dir/$$dep/$${dep}_dependencies.pri) {
dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
exists($$dir/$$1/$${1}_dependencies.pri) {
dependencies_file = $$dir/$$1/$${1}_dependencies.pri
break()
}
}
isEmpty(dependencies_file): \
error("Plugin dependency $$dep not found")
include($$dependencies_file)
dependencyList += " { \"Name\" : \"$$QTC_PLUGIN_NAME\", \"Version\" : \"$$QTCREATOR_VERSION\" }"
return($$QTC_PLUGIN_NAME)
}
# for substitution in the .json
dependencyList =
for(dep, plugin_deps) {
dependencyList += " { \"Name\" : \"$$dependencyName($$dep)\", \"Version\" : \"$$QTCREATOR_VERSION\" }"
}
for(dep, plugin_recmds) {
dependencies_file =
for(dir, QTC_PLUGIN_DIRS) {
exists($$dir/$$dep/$${dep}_dependencies.pri) {
dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
break()
}
}
isEmpty(dependencies_file): \
error("Plugin dependency $$dep not found")
include($$dependencies_file)
dependencyList += " { \"Name\" : \"$$QTC_PLUGIN_NAME\", \"Version\" : \"$$QTCREATOR_VERSION\", \"Type\" : \"optional\" }"
dependencyList += " { \"Name\" : \"$$dependencyName($$dep)\", \"Version\" : \"$$QTCREATOR_VERSION\", \"Type\" : \"optional\" }"
}
dependencyList = $$join(dependencyList, ",$$escape_expand(\\n)")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment