Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost-user] bjam and env var
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2008-10-03 02:36:40

Gennadiy Rozental wrote:

>> - Volodya
> How about complete 3rd party setup? What If I need to specify include path
> library path, libraries to link with list and set of defines?

You'd need 4 environment variables and a lib target in our project that will
use those variables to define things. Alternatively, you can declare a library
target in user-config.jam, something like this:

        project user-config ;
        lib third_party
                : # sources
                : # requirements
                  <name>third_party <search>some-library-path
                : # default build
                : # usage requirements
                  <include>some-include-path <define>some-define

and you can refer to this from your project using


notation. More complex, but unlimately best approach is creating
file third_party.jam, with the following content:

        project.initialize $(__name__) ;
        project third_party ;

        rule init ( name : library-path : include-path : defines * )
                lib third_party
                : # sources
                : # requirements
                  <name>$(name) <search>$(library-path)
                : # default build
                : # usage requirements
                  <include>$(include-path) <define>$(defines)

and add

        using third_party : .... ;

to user-config.jam and refer to this library as


The last approach is better because the 'init' rule can do smart things --
like adding some defines automatically, or accepting just 'install root'
and computing library paths and includes paths from that, etc.

Does this answer your question?

- Volodya

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at