Boost logo

Boost-Build :

Subject: Re: [Boost-build] Picking up options from pkg-config
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-04-01 09:23:08

On Wednesday 01 April 2009 16:46:11 Daniel Lidström wrote:
> Hello,
> some of my friends at work are currently looking into scons.
> They want to switch from Boost.Build that I introduced a few
> years ago, one of the reasons being that they find it hard
> to customize Boost.Build. One example I was shown was how
> they are able to parse the output from pkg-config to set
> up compilation and linking flags. It looks like this:
> env.ParseConfig("pkg-config --cflags --libs glib-2.0")
> The output from pkg-config is this:
> georog-dev:/home/daniel> pkg-config --cflags --libs glib-2.0
> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lglib-2.0
> I'm wondering if it's possible to do this with Boost.Build.
> It seems like something very useful, at least on Linux systems
> (or other where pkg-config is also used).

If you are on Linux, then please use this:

        exe a : a.cpp
        : <cflags>`pkg-config --cflags glib-2.0`
    : <linkflags>`pkg-config --libs glib-2.0`

- Volodya


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