|
Boost-Build : |
Subject: Re: [Boost-build] [boost-build] usage requirements via lib or alias
From: Vladimir Prus (vladimir.prus_at_[hidden])
Date: 2015-09-25 02:37:35
On 24-Sep-15 9:45 PM, Steve Lorimer wrote:
> I have the following library:
>
> lib model
> : [ glob *.cpp *.cc *.h ]
> : <cxxflags>-fPIC
> <library>/qt5//QtCore/<link>shared
> <library>/qt5//QtWidgets/<link>shared
> <library>/qt5//QtGui/<link>shared
> :
> :
> <cxxflags>-fPIC
> ;
>
>
> Using this library in my app pulls in the required qt libraries and links
> fine
>
> If I replace the qt requirements with an alias, and reference that alias in
> my library, my app fails to link with "undefined reference"
>
> alias qt
> :
> : <cxxflags>-fPIC
> <library>/qt5//QtCore/<link>shared
> <library>/qt5//QtWidgets/<link>shared
> <library>/qt5//QtGui/<link>shared
> :
> :
> <cxxflags>-fPIC
> ;
>
> lib model
> : [ glob *.cpp *.cc *.h ]
> qt
> ;
>
>
> What am I doing wrong?
Steve,
what alias metatarget does is:
1. Build all sources, adding specified requirements to build properties
2. Return all the results, adding specified usage requirements too
Since your alias has no sources at all, part (1) does not do anything, and your
<library> requirements have no effect.
If you move them to usage requirements, things should work.
HTH,
Volodya
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk