Please test: changes in how Qt4 is found

Thiago Macieira thiago at kde.org
Fri Apr 28 22:19:39 CEST 2006


William A. Hoffman wrote:
>Is that the Trolltech recommended way for windows and the Mac?
>If Trolltech required that pkg-config be installed before QT could
>be used on any platform, I would have no problem using it.

Qt doesn't require anything found with pkg-config to build. It's pointless 
to require a program that won't be used in the build.

But we do recommend using pkg-config for finding Qt/X11. Not qmake. qmake 
is a separate program that doesn't have to be installed to use or develop 
with Qt.

So, in other words: Qt4 and its headers may be installed but not qmake. If 
the Qt libraries and headers are installed, so are the .pc files.

>But, that does not seem to be the case, unless I am missing
>something?   So, what do the Trolls say should be done if
>pkg-config is not found?  

Bail out and say "install pkg-config". At least on Qt/X11.

And alternative approach would be for cmake to read the .pc files 
directly.

>I am sure many Trolltech customers 
>on windows do not have pkg-config and are happily using Qt,
>I am assuming the answer is use qmake, which is what we are doing.

Windows users have bigger issues. How do you find libz? How do you find 
other libraries?

Most of our Windows-only users don't care about qmake. They use 
Microsoft's tools and that's it. At most, they use the Visual Studio 
integration and generate the project files with qmake, then stop using 
qmake.

>1. find qmake in the PATH
>2. use pkg-config to find qmake
>3. if 1 and 2 are the same qmake, then use the info from pkg-config
>4. if pkg-config was not found, or it points to a different qmake than
>the one in the users PATH, then use qmake to setup the paths for the
> build.

Use pkg-config to find qmake? Why? If pkg-config is found, ask it where 
QtCore is, what its CXXFLAGS are, what the rpath flags are, where moc, 
uic, etc. are.

If it's not found (and if you don't want to bail out), then try to detect 
it using other means.

-- 
Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
  thiago.macieira (AT) trolltech.com     Trolltech AS
    GPG: 0x6EF45358                   |  Sandakerveien 116,
    E067 918B B660 DBD1 105C          |  NO-0402
    966C 33F5 F005 6EF4 5358          |  Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20060428/c9f6a570/attachment-0001.pgp 


More information about the Kde-buildsystem mailing list