[QBS] Framework creation

Joerg Bornemann joerg.bornemann at nokia.com
Mon Sep 10 13:49:28 CEST 2012


On 10/09/2012 12:46, ext Oswald Buddenhagen wrote:

>> I think you can enhance share/qbs/imports/qbs/base/DynamicLibrary.qbs or
>> just add a Framework.qbs there and derive StaticLibrary, DynamicLibrary
>> and Framework from a common library item.
>>
> a framework is just a weird way to build a shared library. it's
> counterproductive to require the user to have a separate product for
> that.

To decide between framework/dylib using a single property instead of the 
product's name is the feasible way to go anyways. The Framework item 
would just set this property. One is not forced to use it.
Whatever. This is an quite unimportant implementation detail.

>> WRT the install location of headers, I like your latter proposal best,
>> because its more explicit where which header get installed to.
>>
> that's exactly the wrong way around. the build tool needs to *hide* that
> fact. it needs to come with a sufficiently rich set of abstract resource
> names which are automatically installed to the right places, depending
> on operating system/packaging conventions.

Here's your sufficiently rich set of abstract resource names: 
destinationHeaders, destinationHeadersPrivate and destinationResources

Let's say you want a certain set of your headers in a sub dir. How you 
you specify this using the filetag approach?

Group {
     fileTags: "private_headers_oh_but_actually_in_subdir"
     files: [...]
}

// and now provide a rule for this file tag that looks exactly like the
// standard install rule but with an altered target path...


BR,

Jörg


-- 
Joerg Bornemann
Senior Engineer
Nokia, Qt Development Frameworks

Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori




More information about the Qbs mailing list