Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-01-14 06:15:25

Jan Rehders wrote:
> Hello,
> first, I'm not sure whether this list is intended for users or
> developers so forgive me if I'm wrong ;)

It is for both :)

> I've set up boost build and I can compile simple apps using bjam --v2
> and it works really smooth. My problem is to make it use the OS X
> frameworks. Instead of the -l parameter for libraries, the -framework
> parameter needs to be used for linking.

> lib gl : : <name>OpenGL ;

I assume the best way would be to tell BBv2 that the above uses
-framework, instead of -l, something like:

lib gl : : <name>OpenGL <link>framework ;

> exe mytest : main.cpp gl : ;

Then here, resolve gl to use -framework instead of -l. I am not
competent in BBv2 yet to ipmlement something like this. Volodya?

> -framework would circumvent the usage of static libraries. So is there
> any option or way I did not discover to tell gcc to use a framework? I
> found <framework> for bjam v1 and <cxxflags> and I'm pretty sure there
> is something like <linkerflags> but I would prefer a "clean" solution -
> any suggestions?

It is possible to define your own features. Take a look at the
documentation on extending BBv2

# in build/v2/tools/builtin.jam:
# 54: feature version : : free ;

feature framework : : free dependency ;

# in build/v2/tools/gcc.jam
# 193: flags LIBRARIES <library-file> ;

flags FRAMEWORKS <framework> ;

# 261: actions link bind LIBRARIES
# 262: {
# 263: "$(CONFIG_COMMAND)" -L"$(LINKPATH)" ...
263: "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -framework"$(FRAMEWORKS)" ...

This would then allow:

exe mytest : main.cpp : <framework>OpenGL ;

Volodya: is there a way to transform
in a way similar to the way you compose features?



Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at