aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-05-16 19:01:37 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2020-05-19 08:54:10 +0000
commit589c0c90c3ae77038b8c4b4a0c98abd2e2e1c0db (patch)
tree3f8f283a4e29a2b7fbedb2f7e9b32a5036af1851
parentacd823e109f48196367e3b8767226f81314ffa65 (diff)
Fix protobufobjc.qbs1.16
Qbs complained about using undefined as a value for cpp.includePaths if objc module was not found Also, get rid of the Properties items as they are not reliable in modules Change-Id: Ifd0088e8a6da09f4befc20a43e8d7da7f32fcf31 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--share/qbs/modules/protobuf/objc/protobufobjc.qbs23
1 files changed, 6 insertions, 17 deletions
diff --git a/share/qbs/modules/protobuf/objc/protobufobjc.qbs b/share/qbs/modules/protobuf/objc/protobufobjc.qbs
index e2c4b5260..151d0d80d 100644
--- a/share/qbs/modules/protobuf/objc/protobufobjc.qbs
+++ b/share/qbs/modules/protobuf/objc/protobufobjc.qbs
@@ -12,23 +12,12 @@ ProtobufBase {
Depends { name: "cpp" }
- // library build
- Properties {
- condition: !frameworkPath
- cpp.includePaths: [outputDir, includePath]
- cpp.libraryPaths: [libraryPath]
- cpp.frameworks: ["Foundation"]
- cpp.dynamicLibraries: ["ProtocolBuffers"]
- }
-
- // framework build
- Properties {
- condition: frameworkPath
- cpp.includePaths: [outputDir]
- cpp.frameworkPaths: [frameworkPath]
- cpp.frameworks: ["Foundation", "Protobuf"]
- cpp.defines: ["GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS"]
- }
+ cpp.includePaths: [outputDir].concat(!frameworkPath && includePath ? [includePath] : [])
+ cpp.libraryPaths: !frameworkPath && libraryPath ? [libraryPath] : []
+ cpp.dynamicLibraries: !frameworkPath && libraryPath ? ["ProtocolBuffers"] : []
+ cpp.frameworkPaths: frameworkPath ? [frameworkPath] : []
+ cpp.frameworks: ["Foundation"].concat(frameworkPath ? ["Protobuf"] : [])
+ cpp.defines: frameworkPath ? ["GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS"] : []
Rule {
inputs: ["protobuf.input"]