MantisBT - CMake
View Issue Details
0006950CMakeModulespublic2008-05-03 17:442008-05-03 17:56
Boris Dušek 
Clinton Stimpson 
normalminoralways
closedfixed 
CMake-2-6 
 
0006950: FindQt4: QtDBus and Phonon include dir not found on Mac OS X (patch attached)
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
Attached is a (IMHO) quick and obvious patch. I did not test with 2.6.0 against which this patch is made, but I did make the same change to a 2.4.8 production installation (only for QtDBus, phonon is not supported at all by 2.4.8), and that removed all the trouble (i.e. the discussed application configuration and compilation worked cleanly (with the classic use like "set(QT_USE_QTDBUS TRUE)").
No tags attached.
patch FindQt4.4.0_Mac_Leopard.patch (714) 2008-05-03 17:44
https://public.kitware.com/Bug/file/1438/FindQt4.4.0_Mac_Leopard.patch
Issue History
2008-05-03 17:44Boris DušekNew Issue
2008-05-03 17:44Boris DušekFile Added: FindQt4.4.0_Mac_Leopard.patch
2008-05-03 17:55Clinton StimpsonStatusnew => assigned
2008-05-03 17:55Clinton StimpsonAssigned To => Clinton Stimpson
2008-05-03 17:56Clinton StimpsonStatusassigned => closed
2008-05-03 17:56Clinton StimpsonNote Added: 0011682
2008-05-03 17:56Clinton StimpsonResolutionopen => fixed

Notes
(0011682)
Clinton Stimpson   
2008-05-03 17:56   
/cvsroot/CMake/CMake/Modules/FindQt4.cmake,v <-- FindQt4.cmake
new revision: 1.117; previous revision: 1.116