aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs
diff options
context:
space:
mode:
Diffstat (limited to 'share/qbs')
-rw-r--r--share/qbs/modules/protobuf/nanopb/nanopb.qbs6
-rw-r--r--share/qbs/modules/protobuf/protobuf.js6
2 files changed, 10 insertions, 2 deletions
diff --git a/share/qbs/modules/protobuf/nanopb/nanopb.qbs b/share/qbs/modules/protobuf/nanopb/nanopb.qbs
index fdf95e2fd..02754b8c4 100644
--- a/share/qbs/modules/protobuf/nanopb/nanopb.qbs
+++ b/share/qbs/modules/protobuf/nanopb/nanopb.qbs
@@ -44,9 +44,13 @@ ProtobufBase {
}
prepare: {
+ var options = input.protobuf.nanopb.importPaths.map(function (path) {
+ return "-I" + path;
+ })
+
var result = HelperFunctions.doPrepare(
input.protobuf.nanopb, product, input, outputs, "nanopb",
- input.protobuf.nanopb._plugin);
+ input.protobuf.nanopb._plugin, options);
return result;
}
}
diff --git a/share/qbs/modules/protobuf/protobuf.js b/share/qbs/modules/protobuf/protobuf.js
index 0fd89856b..999da6988 100644
--- a/share/qbs/modules/protobuf/protobuf.js
+++ b/share/qbs/modules/protobuf/protobuf.js
@@ -92,7 +92,7 @@ function objcArtifact(outputDir, input, tags, suffix) {
}
}
-function doPrepare(module, product, input, outputs, generator, plugin)
+function doPrepare(module, product, input, outputs, generator, plugin, generatorOptions)
{
var outputDir = module.outputDir;
var args = [];
@@ -101,6 +101,10 @@ function doPrepare(module, product, input, outputs, generator, plugin)
args.push("--plugin=" + plugin)
args.push("--" + generator + "_out", outputDir);
+ if (!!generatorOptions) {
+ for (var i = 0; i < generatorOptions.length; ++i)
+ args.push("--" + generator + "_opt=" + generatorOptions[i])
+ }
var importPaths = module.importPaths;
if (importPaths.length === 0)