[CMake] How to make cmake-2.6 tell why it fails

Martin Costabel costabel at wanadoo.fr
Thu Aug 21 05:59:09 EDT 2008


Bill Hoffman wrote:
> 
> Martin Costabel wrote:
[]
>> QT_INCLUDE_DIR:PATH=QT_INCLUDE_DIR-NOTFOUND
>>
>> If I read the module correctly, cmake looks if the file
>> $ENV{QTDIR}/include/qglobal.h exists, which should in principle be the 
>> case. I'll ask her if something is wrong with this file.
>>
>> Thanks
>>
> Well, first it looks for qt.h like this:
> 
> FIND_PATH(QT_INCLUDE_DIR qt.h 
> "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"  
> "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt" 
> "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"  
>   $ENV{QTDIR}/include
>   ${GLOB_PATHS_BIN}
>   /usr/local/qt/include
>   /usr/lib/qt/include
>   /usr/lib/qt3/include
>   /usr/include/qt
>   /usr/share/qt3/include
>   C:/Progra~1/qt/include
>   /usr/include/qt3
>   )

Apparently it also looks for frameworks (this is on MacOSX), although it 
doesn't say so in the script. The current problem was finally solved by 
removing /Library/Frameworks/Qt.framework/.

The environment variable QTDIR had been set to the directory 
/sw/lib/qt3mac where the correct Qt3 installation was living, and cmake 
respected this for finding the variables

QT_MOC_EXECUTABLE:FILEPATH=/sw/lib/qt3mac/bin/moc
QT_QASSISTANTCLIENT_LIBRARY:FILEPATH=/sw/lib/qt3mac/lib/libqassistantclient.a
QT_QT_LIBRARY:FILEPATH=/sw/lib/qt3mac/lib/libqt-mt.dylib
QT_UIC_EXECUTABLE:FILEPATH=/sw/lib/qt3mac/bin/uic

correctly. Only for QT_INCLUDE_DIR it was confused by the presence of 
the  framework and said QT_INCLUDE_DIR-NOTFOUND. Anyway, the problem is 
solved for the moment.

Now I only have to find out why another user gets the error

"find_package cannot find package FREETYPE because FREETYPE_DIR is
set to "/sw/lib/freetype219" which is not a directory containing a 
package configuration file (or it is not for the requested version)."

although everyone else with the same configuration does not get this 
error. Maybe another framework interfering...

-- 
Martin





More information about the CMake mailing list