diff options
author | Ivan Komissarov <ABBAPOH@gmail.com> | 2020-05-20 20:35:05 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2020-05-20 20:35:33 +0200 |
commit | c823a66cd0097a7c009fcaba3c6618da792ef638 (patch) | |
tree | cee348251e7764b24f8347035bda9a132aa724b0 | |
parent | 92970c2cb233bc3c629250312761637ffb6d36b8 (diff) | |
parent | 589c0c90c3ae77038b8c4b4a0c98abd2e2e1c0db (diff) |
Merge branch '1.16'
Change-Id: I9920b1dc853c8c0051e5c5be5e570c2ca38880e6
-rw-r--r-- | share/qbs/modules/protobuf/cpp/protobufcpp.qbs | 12 | ||||
-rw-r--r-- | share/qbs/modules/protobuf/objc/protobufobjc.qbs | 23 | ||||
-rw-r--r-- | src/lib/corelib/tools/vsenvironmentdetector.cpp | 2 |
3 files changed, 14 insertions, 23 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; } 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"] diff --git a/src/lib/corelib/tools/vsenvironmentdetector.cpp b/src/lib/corelib/tools/vsenvironmentdetector.cpp index 95451435a..b0788823f 100644 --- a/src/lib/corelib/tools/vsenvironmentdetector.cpp +++ b/src/lib/corelib/tools/vsenvironmentdetector.cpp @@ -275,8 +275,6 @@ void VsEnvironmentDetector::parseBatOutput(const QByteArray &output, std::vector value.remove(m_windowsSystemDirPath); if (value.endsWith(QLatin1Char(';'))) value.chop(1); - if (value.endsWith(QLatin1Char('\\'))) - value.chop(1); targetEnv->insert(name, value); } } |