aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/projectresolver.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-10-17 10:47:06 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2017-11-07 15:56:33 +0000
commit8ca922793f2a7a10023784d1c18e4b86f552209d (patch)
tree5150fddc8c4fb0e79fc41f65af210feb41a67c38 /src/lib/corelib/language/projectresolver.cpp
parent98e4cef3ea23842d6bceb438e0f1f8285a01d979 (diff)
Enable modules to declare target artifacts
Such artifacts appear to rules just like target artifacts of products. This functionality will be useful for auto-generating qbs modules from products. [ChangeLog] Modules can now declare target artifacts using the new filesAreTargets property of the Group item. Task-number: QBS-882 Change-Id: I3bba000be9a1057d9fef01e5576363719ff1f244 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/language/projectresolver.cpp')
-rw-r--r--src/lib/corelib/language/projectresolver.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/corelib/language/projectresolver.cpp b/src/lib/corelib/language/projectresolver.cpp
index c8bffd547..7b35e4b57 100644
--- a/src/lib/corelib/language/projectresolver.cpp
+++ b/src/lib/corelib/language/projectresolver.cpp
@@ -595,6 +595,7 @@ SourceArtifactPtr ProjectResolver::createSourceArtifact(const ResolvedProductPtr
artifact->fileTags = group->fileTags;
artifact->overrideFileTags = group->overrideTags;
artifact->properties = group->properties;
+ artifact->targetOfModule = group->targetOfModule;
(wildcard ? group->wildcards->files : group->files) += artifact;
return artifact;
}
@@ -758,6 +759,9 @@ void ProjectResolver::resolveGroupFully(Item *item, ProjectResolver::ProjectCont
}
const CodeLocation filesLocation = item->property(QLatin1String("files"))->location();
+ const VariantValueConstPtr moduleProp = item->variantProperty(QLatin1String("__module"));
+ if (moduleProp)
+ group->targetOfModule = moduleProp->value().toString();
ErrorInfo fileError;
if (!patterns.isEmpty()) {
group->wildcards = std::unique_ptr<SourceWildCards>(new SourceWildCards);