-
Notifications
You must be signed in to change notification settings - Fork 5
/
windows-qbs-2.diff
36 lines (30 loc) · 1.13 KB
/
windows-qbs-2.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff --git a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs
index 50caf05..3dfb39a 100644
--- a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs
+++ b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs
@@ -8,7 +8,7 @@
ProtobufBase {
property string includePath: includeProbe.path
- property string libraryPath: libraryProbe.path
+ property string libraryPath: libraryProbe.found ? libraryProbe.path : undefined
property bool useGrpc: false
@@ -17,10 +17,11 @@
readonly property string _libraryName: {
var libraryName;
- if (libraryProbe.found)
+ if (libraryProbe.found) {
libraryName = FileInfo.baseName(libraryProbe.fileName);
- if (libraryName.startsWith("lib"))
- libraryName = libraryName.substring(3);
+ if (libraryName.startsWith("lib"))
+ libraryName = libraryName.substring(3);
+ }
return libraryName;
}
@@ -104,6 +105,7 @@
"protobuf",
"protobufd",
]
+ searchPaths: libraryPath ? [libraryPath] : []
}
Probes.IncludeProbe {