Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-12-09 02:40:43


Hi Tyson,

> Is there an easy way to make a library where the actual source is divided
> in multiple sub directories?
>
> ie: I have a structure like this:
>
> Base Dir
>
> ->include
>
> ->lib
>
> ->source1
>
> ->source2
>
> ->sourceN
>
> I have a script to link all of the header files to the include directory
> and I'd like to make ONE library from the source in source1 through
> sourceN. I don't mind if there have to be some sort of project files in
> each of the source directories, etc. but I'd like to avoid having to refer
> to all of the source files from a project in the base directory.

Will the following code in "lib/Jamfile":

   lib your_lib : [ glob ../source1/*.cpp ] [ glob ../source2/*.cpp ] ;

work for you? If you want to avoid grabbing all source files, you can put
this to source1/Jamfile:

   alias sources : file1.cpp file2.cpp ;

and then lib/Jamfile can use:

   lib your_lib : ../source1//sources ........ ;

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