[QBS] RFC pkgconfig support

marius.storm-olsen at nokia.com marius.storm-olsen at nokia.com
Thu Feb 23 13:09:21 CET 2012


On 02/23/2012 05:04 AM, ext Oswald Buddenhagen wrote:
> On Thu, Feb 23, 2012 at 10:52:11AM +0100, ext Joerg Bornemann wrote:
>> Comments appreciated.
>>
> i don't like it because it makes the pkg-config use explicit in the
> projects. that's counter to the idea that every module ought to be
> treated the same.
>
> the clean solution is having a separate module for every possible
> dependency. these can use some centralized pkg-config helper
> internally. of course this means adding loooots of modules (at least
> until we gain world domination and every library provides its own
> Modules).
>
> the somewhat magic solution would be adding some sort of module
> factory. when a module is asked for, factory modules are queried and
> may forge out modules with the requested names after querying some
> backend (pkg-config in this case, obviously). the downside of this is
> that external libraries may appear under two module names: one of the
> explicit module we wrote first, and second of the pkg-config name it
> chose itself later. that's not *really* a problem, it will just lead
> to inconsistency across projects. another downside is that the
> pkg-config module naming conventions do not match our CamelCase
> conventions, which means that we need to accept ugliness on the user
> side or build some magic name rewriting into the factory.

Right, the original intention was for modules which have not been 
locally satisfied in the project structure, to be tried satisfied by a 
general backends, so in accordance with your last paragraph.

The qbs user shouldn't have to think about a module being local or not. 
Changing a project from using a system libpng to a local/specialized 
version, should simply be to drop in a libpng project with its own .qbs 
file somewhere in the project hierarchy. No modifications to the other 
project should be needed.

Yes, it will require a pinch of magic in the general backends, but as 
long at it is documented, and we keep the pixie dust to a minimum, we 
should be good, IMO.

-- 
.marius


More information about the Qbs mailing list