[Qbs] Building a product's files into another product

Alberto Mardegan mardy at users.sourceforge.net
Wed Jul 29 22:52:20 CEST 2020


Hi!
  The subject is a bit convoluted, but the meaning is this one: I have
product A defined like this:

Product {
    type: "linkme"
    name: "a"
    Depends { name: "cpp" }
    files: ["one.cpp"]
}

(in reality, the situation is more complex than this and the input files
are static files with the "qt.core.resource_data" tag, which causes a
"qrc_a.cpp" to be generated)

And I'm trying to use it from a product B:

CppApplication {
    name: "b"
    Depends { name: "a" }
    ...
}

Now, I would like that the cpp files from product A would be used when
building product B, that is as if product A was a Group. But it looks
like the Depends item is not effective.

I also tried to change the product's type to "obj", and this at least
causes the files in product A to be compiled; but they are still not
added to product B.

Indeed, it all works if I change product's A type to "staticlibrary",
but that forces me to use Q_INIT_RESOURCE, which I was trying to avoid.

Any ideas?

(the reason why I'm using a product and not a Group is that, under some
configurations, this could indeed be a separate product like a loadable
module)

Ciao,
  Alberto


-- 
http://www.mardy.it - Geek in un lingua international


More information about the Qbs mailing list