aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp/GenericGCC.qbs
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2021-05-04 16:49:38 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2021-05-06 10:18:11 +0000
commit8b4ea1276558e65109982339d3ae65a143e2360d (patch)
treece18aa59d60a34f01b990673a19f55c56b0eac82 /share/qbs/modules/cpp/GenericGCC.qbs
parent614e7381255bc48a494df45f09015c0ad9a7453f (diff)
Fix conditionally generation for some artifacts and tags
We need to generate a list of file tags and artifacts taking into account the dependent properties from the product. For example, we should only build tags for generating linker files if the generateLinkerMapFile property has been set. Change-Id: I286c566ffe119eebf24b60113dda65403f7af3dd Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/modules/cpp/GenericGCC.qbs')
-rw-r--r--share/qbs/modules/cpp/GenericGCC.qbs34
1 files changed, 24 insertions, 10 deletions
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs
index 934636849..db45c8683 100644
--- a/share/qbs/modules/cpp/GenericGCC.qbs
+++ b/share/qbs/modules/cpp/GenericGCC.qbs
@@ -403,12 +403,14 @@ CppModule {
}
inputsFromDependencies: ["dynamiclibrary_symbols", "staticlibrary", "dynamiclibrary_import"]
- outputFileTags: [
- "bundle.input",
- "dynamiclibrary", "dynamiclibrary_symlink", "dynamiclibrary_symbols", "debuginfo_dll",
- "debuginfo_bundle","dynamiclibrary_import", "debuginfo_plist",
- "codesign.signed_artifact",
- ]
+ outputFileTags: {
+ var tags = ["bundle.input", "dynamiclibrary", "dynamiclibrary_symlink",
+ "dynamiclibrary_symbols", "debuginfo_dll", "debuginfo_bundle",
+ "dynamiclibrary_import", "debuginfo_plist"];
+ if (shouldSignArtifacts)
+ tags.push("codesign.signed_artifact");
+ return tags;
+ }
outputArtifacts: {
var artifacts = [{
filePath: product.destinationDirectory + "/"
@@ -519,8 +521,13 @@ CppModule {
}
inputsFromDependencies: ["dynamiclibrary_symbols", "dynamiclibrary_import", "staticlibrary"]
- outputFileTags: ["bundle.input", "loadablemodule", "debuginfo_loadablemodule",
- "debuginfo_bundle", "debuginfo_plist", "codesign.signed_artifact"]
+ outputFileTags: {
+ var tags = ["bundle.input", "loadablemodule", "debuginfo_loadablemodule",
+ "debuginfo_bundle", "debuginfo_plist"];
+ if (shouldSignArtifacts)
+ tags.push("codesign.signed_artifact");
+ return tags;
+ }
outputArtifacts: {
var app = {
filePath: FileInfo.joinPaths(product.destinationDirectory,
@@ -559,8 +566,15 @@ CppModule {
}
inputsFromDependencies: ["dynamiclibrary_symbols", "dynamiclibrary_import", "staticlibrary"]
- outputFileTags: ["bundle.input", "application", "debuginfo_app", "debuginfo_bundle",
- "debuginfo_plist", "mem_map", "codesign.signed_artifact"]
+ outputFileTags: {
+ var tags = ["bundle.input", "application", "debuginfo_app", "debuginfo_bundle",
+ "debuginfo_plist"];
+ if (shouldSignArtifacts)
+ tags.push("codesign.signed_artifact");
+ if (generateLinkerMapFile)
+ tags.push("mem_map");
+ return tags;
+ }
outputArtifacts: {
var app = {
filePath: FileInfo.joinPaths(product.destinationDirectory,