aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/Exporter/pkgconfig/pkgconfig.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/qbs/modules/Exporter/pkgconfig/pkgconfig.js')
-rw-r--r--share/qbs/modules/Exporter/pkgconfig/pkgconfig.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/share/qbs/modules/Exporter/pkgconfig/pkgconfig.js b/share/qbs/modules/Exporter/pkgconfig/pkgconfig.js
index a3109d61d..52b4dffe3 100644
--- a/share/qbs/modules/Exporter/pkgconfig/pkgconfig.js
+++ b/share/qbs/modules/Exporter/pkgconfig/pkgconfig.js
@@ -44,9 +44,9 @@ function writeEntry(product, file, key, propertyName, required, additionalValues
var value = product.Exporter.pkgconfig[propertyName];
if (additionalValues && additionalValues.length > 0)
value = (value || []).concat(additionalValues);
- var valueIsNotEmpty = value && (!Array.isArray(value) || value.length > 0);
+ var valueIsNotEmpty = value && (!(value instanceof Array) || value.length > 0);
if (valueIsNotEmpty) {
- if (Array.isArray(value))
+ if (value instanceof Array)
value = value.join(' ');
file.writeLine(key + ": " + value);
} else if (required) {
@@ -83,7 +83,7 @@ function collectAutodetectedData(topLevelProduct)
|| (value.length > installPrefix.length && value[installPrefix.length] !== '/')) {
return quotedValue;
}
- return quotedValue.replace(product.qbs.installPrefix, "${prefix}");
+ return quotedValue.replace(topLevelProduct.qbs.installPrefix, "${prefix}");
}
function transformedValue(product, moduleName, propertyName)
@@ -92,7 +92,7 @@ function collectAutodetectedData(topLevelProduct)
var value = transformFunc
? eval("(" + transformFunc + ")(product, moduleName, propertyName, originalValue)")
: originalValue;
- if (Array.isArray(value))
+ if (value instanceof Array)
value.forEach(function(v, i, a) { a[i] = quoteAndPrefixify(v); });
else if (value)
value = quoteAndPrefixify(value);