aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-06-05 13:29:58 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2018-06-06 07:53:47 +0000
commit0af8d1b7870d44e4a024669cae28593173687de1 (patch)
tree6e637188b7d3a341b6e6a5e78703bdc381f030ff /share
parentc317ceb66930ac7a4312e6bfc51f1303a5413c34 (diff)
Exporter.pkgconfig: Add support for custom variables
Change-Id: I42a01e549c15c91428d0f8bd9be03ea59c773032 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qbs/modules/Exporter/pkgconfig/pkgconfig.qbs8
1 files changed, 8 insertions, 0 deletions
diff --git a/share/qbs/modules/Exporter/pkgconfig/pkgconfig.qbs b/share/qbs/modules/Exporter/pkgconfig/pkgconfig.qbs
index ebdee41f0..5fbda2bf4 100644
--- a/share/qbs/modules/Exporter/pkgconfig/pkgconfig.qbs
+++ b/share/qbs/modules/Exporter/pkgconfig/pkgconfig.qbs
@@ -21,6 +21,8 @@ Module {
property stringList requiresPrivateEntry: []
property stringList conflictsEntry: []
+ property var customVariables
+
property bool _usePrefix: autoDetect && qbs.installPrefix
additionalProductTypes: ["Exporter.pkgconfig.pc"]
@@ -53,6 +55,12 @@ Module {
var f = new TextFile(output.filePath, TextFile.WriteOnly);
if (product.Exporter.pkgconfig._usePrefix)
f.writeLine("prefix=" + product.qbs.installPrefix + "\n");
+ var customVariables = product.Exporter.pkgconfig.customVariables;
+ if (customVariables) {
+ for (var customVar in customVariables)
+ f.writeLine(customVar + "=" + customVariables[customVar]);
+ f.writeLine("");
+ }
var autoDetectedData = HelperFunctions.collectAutodetectedData(product);
HelperFunctions.writeEntry(product, f, "Name", "nameEntry", true);
HelperFunctions.writeEntry(product, f, "Description", "descriptionEntry", true);