[CMake] FindQt4: QtDBus and Phonon include dir not found on Mac OS X

Boris Dušek boris.dusek at gmail.com
Sat May 3 16:54:44 EDT 2008


Hi,

a problem compiling an app on Mac OS X Leopard 10.5.2 using Qt 4.4.0
RC and CMake 2.4.8 (and probably 2.6.0 RC10 as well) as a build system
led me to dig into Modules/FindQt4.cmake and discover something really
suspicious:

for all libraries but QtDBus and phonon, include directories are
searched for in both QT_INCLUDE_DIR/<libname> and
QT_LIBRARY_DIR/<libname>.framework/Headers. But for the two mentioned
libraries, only QT_INCLUDE_DIR/<libname> is searched. This leads to
cmake asking me to manually set QT_QTDBUS_INCLUDE_DIR (in case of
DBus). But the headers would be found if the second variant (the one
with ".framework") would be user. The offending lines are at
Modules/FindQt4.cmake, version 2.6.0 RC10, lines 644 and 683, or the
same file, line 590, for version 2.4.8. Please consider if they are a
bug (I am a beginner with CMake, so I don't feel like making confident
statements about bugs ...).

Now I did not test with CMake 2.6.0, but the same suspicious include
directory logic is still present (and 2.6.10 is the version where
phonon is present, unlike in 2.4.8).

Hope I did not miss something obvious and helped with discovering a bug.

Cheers,
Boris Dušek


More information about the CMake mailing list