aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/qbs/modules/protobuf/cpp/protobufcpp.qbs14
-rw-r--r--share/qbs/modules/protobuf/objc/protobufobjc.qbs16
-rw-r--r--share/qbs/modules/protobuf/protobufbase.qbs6
3 files changed, 22 insertions, 14 deletions
diff --git a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs
index 5cb3257d4..2b6e94e83 100644
--- a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs
+++ b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs
@@ -28,12 +28,14 @@ ProtobufBase {
prepare: HelperFunctions.doPrepare(input.protobuf.cpp, product, input, outputs, "cpp")
}
- validate: {
- baseValidate();
- if (!HelperFunctions.checkPath(includePath))
- throw "Can't find cpp protobuf include files. Please set the includePath property.";
- if (!HelperFunctions.checkPath(libraryPath))
- throw "Can't find cpp protobuf library. Please set the libraryPath property.";
+ validateFunc: {
+ return function() {
+ base();
+ if (!HelperFunctions.checkPath(includePath))
+ throw "Can't find cpp protobuf include files. Please set the includePath property.";
+ if (!HelperFunctions.checkPath(libraryPath))
+ throw "Can't find cpp protobuf library. Please set the libraryPath property.";
+ }
}
Probes.IncludeProbe {
diff --git a/share/qbs/modules/protobuf/objc/protobufobjc.qbs b/share/qbs/modules/protobuf/objc/protobufobjc.qbs
index c252d9949..e2c4b5260 100644
--- a/share/qbs/modules/protobuf/objc/protobufobjc.qbs
+++ b/share/qbs/modules/protobuf/objc/protobufobjc.qbs
@@ -43,13 +43,15 @@ ProtobufBase {
prepare: HelperFunctions.doPrepare(input.protobuf.objc, product, input, outputs, "objc")
}
- validate: {
- baseValidate();
- if (!HelperFunctions.checkPath(frameworkPath)) {
- if (!HelperFunctions.checkPath(includePath))
- throw "Can't find objective-c protobuf include files. Please set the includePath or frameworkPath property.";
- if (!HelperFunctions.checkPath(libraryPath))
- throw "Can't find objective-c protobuf library. Please set the libraryPath or frameworkPath property.";
+ validateFunc: {
+ return function() {
+ base();
+ if (!HelperFunctions.checkPath(frameworkPath)) {
+ if (!HelperFunctions.checkPath(includePath))
+ throw "Can't find objective-c protobuf include files. Please set the includePath or frameworkPath property.";
+ if (!HelperFunctions.checkPath(libraryPath))
+ throw "Can't find objective-c protobuf library. Please set the libraryPath or frameworkPath property.";
+ }
}
}
diff --git a/share/qbs/modules/protobuf/protobufbase.qbs b/share/qbs/modules/protobuf/protobufbase.qbs
index ec13eb3b5..0ac6c1949 100644
--- a/share/qbs/modules/protobuf/protobufbase.qbs
+++ b/share/qbs/modules/protobuf/protobufbase.qbs
@@ -10,7 +10,7 @@ Module {
property string outputDir: product.buildDirectory + "/protobuf"
- readonly property var baseValidate: {
+ property var validateFunc: {
return function() {
if (!File.exists(protocBinary))
throw "Can't find protoc binary. Please set the protocBinary property or make sure it is found in PATH";
@@ -26,4 +26,8 @@ Module {
id: protocProbe
names: ["protoc"]
}
+
+ validate: {
+ validateFunc();
+ }
}