aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/protobuf
diff options
context:
space:
mode:
authorKai Dohmen <psykai1993@googlemail.com>2020-09-21 12:15:00 +0200
committerKai Dohmen <psykai1993@googlemail.com>2020-09-24 11:46:31 +0000
commit82020280ac9a4f9082c4390a30d41473cf401c39 (patch)
treec5dd4c185d7965e2cfec27944266b6b550ef8887 /tests/auto/blackbox/testdata/protobuf
parent0d85123b3850f1df07184b018916525bc9a44e97 (diff)
Make protobuf.*.outputDir public again
Make protobuf outputDir public again for usage with installSourceBase when creating/installing a separate proto-only library product. Make outputDir readonly since it should not be set by the user. Changed artifacts tag hpp to protobuf.hpp for better filtering. Change-Id: I8697e880aacfe4d3029fd6f547a5d8c1eee7ee7e Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'tests/auto/blackbox/testdata/protobuf')
-rw-r--r--tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs53
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs b/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs
new file mode 100644
index 000000000..0dc6fb2ea
--- /dev/null
+++ b/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs
@@ -0,0 +1,53 @@
+import qbs
+
+Project {
+ StaticLibrary {
+ condition: {
+ var result = qbs.targetPlatform === qbs.hostPlatform;
+ if (!result)
+ console.info("targetPlatform differs from hostPlatform");
+ return result && hasProtobuf;
+ }
+ name: "proto_lib"
+
+ Depends { name: "cpp" }
+ cpp.cxxLanguageVersion: "c++11"
+ cpp.minimumMacosVersion: "10.8"
+
+ protobuf.cpp.importPaths: product.sourceDirectory
+
+ Depends { name: "protobuf.cpp"; required: false }
+ property bool hasProtobuf: {
+ console.info("has protobuf: " + protobuf.cpp.present);
+ return protobuf.cpp.present;
+ }
+
+ files: [
+ "import.proto",
+ "subdir/myenum.proto",
+ ]
+
+ Export {
+ Depends { name: "cpp" }
+ Depends { name: "protobuf.cpp"; required: false }
+ cpp.cxxLanguageVersion: "c++11"
+ cpp.minimumMacosVersion: "10.8"
+ cpp.includePaths: product.protobuf.cpp.outputDir
+ }
+ }
+
+ CppApplication {
+ condition: proto_lib.present
+ name: "consumes_proto_lib"
+ consoleApplication: true
+
+ files: [
+ "import-main.cpp",
+ ]
+
+ Depends {
+ name: "proto_lib"
+ required: false
+ }
+ }
+}