diff options
Diffstat (limited to 'share/qbs/modules/protobuf/nanopb/nanopb.qbs')
-rw-r--r-- | share/qbs/modules/protobuf/nanopb/nanopb.qbs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/share/qbs/modules/protobuf/nanopb/nanopb.qbs b/share/qbs/modules/protobuf/nanopb/nanopb.qbs index 02754b8c4..36bdc9254 100644 --- a/share/qbs/modules/protobuf/nanopb/nanopb.qbs +++ b/share/qbs/modules/protobuf/nanopb/nanopb.qbs @@ -12,6 +12,12 @@ ProtobufBase { property string pluginPath: pluginProbe.path property string _plugin: "protoc-gen-nanopb=" + FileInfo.joinPaths(pluginPath, "protoc-gen-nanopb") + readonly property string _libraryName: { + var libraryName = FileInfo.baseName(libraryProbe.fileName); + if (libraryName.startsWith("lib")) + libraryName = libraryName.substring(3); + return libraryName; + } Depends { name: "cpp" } @@ -21,7 +27,12 @@ ProtobufBase { result.push(libraryPath); return result; } - cpp.dynamicLibraries: "protobuf-nanopb" + cpp.dynamicLibraries: { + var result = []; + if (_libraryName) + result.push(_libraryName); + return result; + } cpp.includePaths: { var result = [outputDir]; if (includePath) @@ -62,7 +73,10 @@ ProtobufBase { Probes.LibraryProbe { id: libraryProbe - names: "protobuf-nanopb" + names: [ + "protobuf-nanopb", + "protobuf-nanopbd", + ] } Probes.BinaryProbe { |