forked from qt-creator/qt-creator
Project: Deduplicate dependency resolving logic
Change-Id: I6af80600b060fa6a99704df0709461799858d41e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
e747817c95
commit
0b996210f6
@@ -14,33 +14,27 @@ plugin_recmds = $$QTC_PLUGIN_RECOMMENDS
|
||||
|
||||
include(../qtcreator.pri)
|
||||
|
||||
defineReplace(dependencyName) {
|
||||
dependencies_file =
|
||||
for(dir, QTC_PLUGIN_DIRS) {
|
||||
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)
|
||||
return($$QTC_PLUGIN_NAME)
|
||||
}
|
||||
|
||||
# for substitution in the .json
|
||||
dependencyList =
|
||||
for(dep, plugin_deps) {
|
||||
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\" }"
|
||||
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)")
|
||||
|
||||
|
Reference in New Issue
Block a user