Gennadiy Rozental | 3 Oct 18:01
Picon

Re: [Boost-user] bjam and env var

Vladimir Prus <vladimir <at> codesourcery.com> writes:

> > 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. 

I've got only one "unknown" - env var 3RD_PARTY_LIB_HOME. The rest is deducible.
The list of libs to link with and list of defines I know. 

> Alternatively, you can declare a library
> target in user-config.jam, something like this:

I don't think user-config is an option here. I need to setup my Jamfile so that
user only need to set 1 env var for it to work.

>         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
>                 ;

How do I list all the libraries to link with? Some static some dynamic.

> and you can refer to this from your project using
> 
>         /user-config//third_party
> 
> notation. More complex, but unlimately best approach is creating
> file third_party.jam, with the following content:

Can I put this file along with my own Jamfile? How will I refer to it?

[...] 
> 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.

Why Can't I do a deduction in regular lib rule? in most cases it's just simple 
$(HOME)/include and $(HOME)/lib

Gennadiy

Gmane