[CMake] How to make cmake-2.6 tell why it fails
Bill Hoffman
bill.hoffman at kitware.com
Tue Aug 19 17:31:35 EDT 2008
Martin Costabel wrote:
> Bill Hoffman wrote:
> []
>> So, what are the values of QT_INCLUDE_DIR AND QT_QT_LIBRARY in the
>> users CMakeCache.txt file? One of those must not be found.
>
> Indeed:
>
> 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
)
Then, it makes sure that the path is valid by checking for qglobal.h:
# if qglobal.h is not in the qt_include_dir then set
# QT_INCLUDE_DIR to NOTFOUND
IF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
SET(QT_INCLUDE_DIR QT_INCLUDE_DIR-NOTFOUND CACHE PATH "path to Qt3
include directory" FORCE)
ENDIF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
Either of those could have failed...
-Bill
More information about the CMake
mailing list