Trouble with glib2, pkg-config and cmake under Debian
Hans Meine
hans_meine at gmx.net
Wed Aug 22 09:39:41 BST 2007
Am Dienstag, 21. August 2007 18:11:53 schrieb Josef Spillner:
> On Tuesday 21 August 2007 17:43:41 Hans Meine wrote:
> > I don't know what the "proper" solution is, but AFAICS, you *do* need two
> > -I paths in CPPFLAGS. The only alternative solution I see is a
> > platform-depend include directory with *all* files duplicated (possibly
> > symlinked).
>
> But the whole point of pkg-config is to not care about such details. If we
> must limit everything to one -I and one -L, then we can as well abandon
> pkg-config.
Yes, pkg-config knows about both paths:
[2] meine at kogspc33:~ -> pkg-config --cflags glib-2.0
-I/software/glib-2.12.9/include/glib-2.0 -I/software/glib-2.12.9/SuSE-10.2/lib/glib-2.0/include
But as Thiago points out, there are problems with programs like cmake and
qmake, which need only the path, not the cmdline args for the compiler. This
needs workarounds like this (from a .pro file):
INCLUDEPATH += . \
$$system( pkg-config --cflags-only-I vigraqt | sed "s,-I,,g" ) \
(And unfortunately, if you open such .pro files in designer, the pipe symbol
does not survive and everything breaks.)
Ciao, / /
/--/
/ / ANS
More information about the kde-core-devel
mailing list