diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2020-05-17 13:25:50 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2020-05-19 07:38:30 +0000 |
commit | ef814dd7d757e2870a24f2913d90edf6d821fc90 (patch) | |
tree | 3f398e0335f16450389bbe2fab76b8a2f1bcb1f2 | |
parent | 42994febafe0f0f2d2d3a1bfeffa33b854f22132 (diff) |
Do not use undefined properties in protobufcpp.qbs
Change-Id: Ie3a65702ba7604984bc3c4d456a2c6999e1d4925
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | share/qbs/modules/protobuf/cpp/protobufcpp.qbs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs index 4d5228813..450286805 100644 --- a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs +++ b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs @@ -26,8 +26,10 @@ ProtobufBase { } cpp.libraryPaths: { - var result = [libraryPath]; - if (useGrpc) + var result = []; + if (libraryPath) + result.push(libraryPath); + if (useGrpc && grpcLibraryPath) result.push(grpcLibraryPath); return result; } @@ -40,8 +42,10 @@ ProtobufBase { return result; } cpp.includePaths: { - var result = [outputDir, includePath]; - if (useGrpc) + var result = [outputDir]; + if (includePath) + result.push(includePath); + if (useGrpc && grpcIncludePath) result.push(grpcIncludePath); return result; } |