changes how Qt4 is found in trunk/kdelibs/

Simon Hausmann hausmann at kde.org
Wed Apr 5 17:04:38 CEST 2006


On Wednesday 05 April 2006 16:49, William A. Hoffman wrote:
> At 10:37 AM 4/5/2006, Simon Hausmann wrote:
> >We solved it differently now. After some discussion and thinking we
> > decided against putting it into qmake. Instead we store the path to uic
> > and moc now in the pkgconfig files.
> >
> >That means with Qt 4.2 you'll be able to use pkg-config to figure out the
> >libraries + paths for building a Qt application as well as the path to
> >moc/uic.
> >
> >For example:
> >
> >pkg-config --variable=moc_location QtCore
>
> What about systems that do not have pkg-config?

For those you have to assume the fallback of a in-place installation where 
everything is inside $prefix and the binaries aren't renamed. This in 
particular includes Windows :)

Here's one of the arguments that we came up with against putting it into 
qmake: pkg-config is the preferred way of figuring out the 
cflags/lib/libpaths these days. Now if however qmake is used to figure out 
another component necessary to build projects you could easily run into the 
situation that due to pkg-config (which obeys the PKG_CONFIG_PATH environment 
variable) you get for example /home/developer/my/private/qt/build/lib as 
library directory but qmake is accidentially picked from /usr/bin and 
reports /usr/bin/uic-qt4 from the path, which may come from a different Qt 
installation. That's a recipe for problems. Hence the idea that all the 
information should come from one place: pkg-config files.

Simon


More information about the Kde-buildsystem mailing list