refs #461 flattenSubdirs function can respect the REQUIRES variable of nested projects.

This commit is contained in:
Mathew Sutcliffe
2015-11-23 21:15:01 +00:00
parent 9968ccbbdb
commit d51055eb4f

View File

@@ -31,6 +31,10 @@ equals(TEMPLATE, "vcsubdirs") {
BASEDIR = $$2 BASEDIR = $$2
for(subdir, SUBDIRS) { for(subdir, SUBDIRS) {
SUBDIR_PROJECT = $$subdirToProjectFile($$subdir, $$BASEDIR) SUBDIR_PROJECT = $$subdirToProjectFile($$subdir, $$BASEDIR)
INNER_REQUIRES = $$fromfile($$SUBDIR_PROJECT, REQUIRES)
REQUIRES_OK = 1
for(req, INNER_REQUIRES): !if($${req}): REQUIRES_OK = 0
equals(REQUIRES_OK,1) {
INNER_TEMPLATE = $$fromfile($$SUBDIR_PROJECT, TEMPLATE) INNER_TEMPLATE = $$fromfile($$SUBDIR_PROJECT, TEMPLATE)
equals(INNER_TEMPLATE, "vcsubdirs") { equals(INNER_TEMPLATE, "vcsubdirs") {
INNER_SUBDIRS = $$fromfile($$SUBDIR_PROJECT, SUBDIRS) INNER_SUBDIRS = $$fromfile($$SUBDIR_PROJECT, SUBDIRS)
@@ -38,6 +42,7 @@ equals(TEMPLATE, "vcsubdirs") {
} }
else: SUBDIRS_FLAT += $$SUBDIR_PROJECT else: SUBDIRS_FLAT += $$SUBDIR_PROJECT
} }
}
return($$SUBDIRS_FLAT) return($$SUBDIRS_FLAT)
} }