Boost logo

Boost-Build :

Subject: Re: [Boost-build] Library Definitions Global
From: Gevorg Voskanyan (v_gevorg_at_[hidden])
Date: 2011-01-17 13:59:37


Richard B. Opsal, Ph.D. wrote:
>Greetings,
>
>Is it possible to define library definitions "up" in the chain of jamfile.jam
>files. For example, I would like to define:
>
>lib advapi32 : : <name>advapi32 ;
>lib comdlg32 : : <name>comdlg32 ;
>lib gdi32 : : <name>gdi32 ;
>lib glu32 : : <name>glu32 ;
>lib imm32 : : <name>imm32 ;
>lib kernel32 : : <name>kernel32 ;
>lib ole32 : : <name>ole32 ;
>lib oleaut32 : : <name>oleaut32 ;
>lib opengl32 : : <name>opengl32 ;
>lib shell32 : : <name>shell32 ;
>lib user32 : : <name>user32 ;
>lib uuid : : <name>uuid ;
>lib winmm : : <name>winmm ;
>lib winspool : : <name>winspool ;
>lib ws2_32 : : <name>ws2_32 ;
>
>
>
>
>alias libs_core : kernel32 user32 shell32 uuid ole32 advapi32 ws2_32 ;
>alias libs_gui : gdi32 comdlg32 oleaut32 imm32 winmm winspool ws2_32 ole32
>user32 advapi32 ;
>alias libs_network : ws2_32 ;
>alias libs_opengl : glu32 opengl32 gdi32 user32 ;
>alias libs_compat : advapi32 shell32 comdlg32 user32 gdi32 ws2_32 ;
>
>
>It would then be convenient to access the various libraries by their aliases.

Well, you could have this in your top-level jamroot file:

path-constant TOP : . ;

# not necessary to write a target for every separate lib

alias libs_core : [ lib kernel32 user32 shell32 uuid ole32 advapi32 ws2_32 ]
;
# other libs_* aliases...

And then refer to them in child jamfiles like this:

$(TOP)//libs_core

HTH,
Gevorg


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