[Kde-bindings] Qt Compile Flags (Was: Compiling Without Installing)

Arno Rehn arno at arnorehn.de
Tue Jun 2 17:44:00 UTC 2009


On Tuesday 02 June 2009 00:13:31 Jonathan Yu wrote:
> Hm.
>
> I did manage to track down the issue.
>
> Your Makefile.PL expects stuff to be in /opt... However on Debian it is
> not.
>
> On GNOME and other packages, it comes with a command (GNOME has
> pkg-config) which will return compiler flags, so when you do
> Makefile.PL you can do: `pkg-config --cflags` to get compiler flags,
> which get passed directly to gcc.
>
> From Google it seems there is no established way to do this (ie via
> pkg-config), which is too bad. So that means for the purpose of
> developing bindings, we need to figure out a list of common places Qt4
> is going to be installed. The problem is, too, that we want our
> bindings to be compatible with the whole of Qt, rather than just Qt
> 4.5.2 or whatever. So that's a lot of work to do.
>
> What I'd really like to see is a command like pkg-config for Qt. How
> hasn't this come up before?
$ pkg-config --libs --cflags QtCore QtGui
-DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtGui  -lQtGui -lQtCore
works pretty fine for me.
Otherwise, do it the way cmake does it. Look for qmake in your path, strip the 
bin/ part of it and you have qt's prefix.

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list