[Qbs] Any novice tickets
abbapoh at gmail.com
Thu Aug 9 12:50:52 CEST 2018
Ok, I forgot about objective-C, so yes, I will use explicit property.
Anyway, I got a question, does product.dependencies contains only strict
dependencies (specified at Product item), or the list of all dependencies,
including deps from dependent products/modules?
2018-08-09 12:16 GMT+03:00 Christian Kandeler <christian.kandeler at qt.io>:
> On Thu, 9 Aug 2018 03:53:50 +0300
> Иван Комиссаров <abbapoh at gmail.com> wrote:
> > Im a bit stuck with protobuf module. I’m trying to make the module
> behave different for different languages, i.e. generate .cc files for cpp
> project, java for java project and so on.
> > I am trying to use product.dependencies[i].name == «cpp» condition. It
> works in the outputArtifacts section, but i can’t provide a conditionally
> exported cpp.staticLibraries: ["protobuf»]
> I assume you are referring to the suggestion in the bug report to
> auto-detect the target language? I'm not sure this is so valuable, and we
> could easily guess wrong. What if a project has both a cpp and a Java
> dependency? What about C++ vs Objective-C? Both come from the cpp module...
> I suggest providing a property targetLanguages where the user can set the
> language(s) explicitly and have matching conditions in the respective rules
> (or have just one rule, but different ones might be cleaner).
> Coming up with a good default value seems a bit tricky, but perhaps we can
> just leave it empty and inform the user that it needs to be set.
> > Here’s the code https://pastebin.com/gNMiNg7G <
> > I tried to tie cpp.staticLibraries to each artifact (but i guess the
> libraries are ignored for cpp tags) and i tried to use a Properties but it
> seems my condition function is not called at all (at least, throwing in it
> makes no result)
> It makes no sense to set cpp.*Libraries on an artifact. The linker rule
> reads this property from the product level.
> Qbs mailing list
> Qbs at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qbs