Hi,

I'm running through a strange error when trying to find Qt4 with CMake.
I include the following lines in my CMakeLists.txt:

FIND_PACKAGE(Qt4)
MESSAGE(STATUS "${qt4_include_dir}")
MESSAGE(STATUS "${QT_USE_FRAMEWORKS}")
MESSAGE(STATUS "${QT_QTCORE_INCLUDE_DIR}")
MESSAGE(STATUS "${QT_INCLUDE_DIR}")
MESSAGE(STATUS "${QT_FOUND}")

And here is the output when I run CMake in this directory:

-- C:/Qt/4.1.4/include
--
-- C:/Qt/4.1.4/include/QtCore
-- QT_INCLUDE_DIR-NOTFOUND
-- NO

This is really strange, because everything seems to be found, only the
last variables are not set properly.
Just to avoid you travelling your whole tree I put the piece of code
from FindQt4.cmake that really makes me wonder why these variables are
not set properly:

IF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR)
   IF (QT_USE_FRAMEWORKS)
     SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR})
   ELSE (QT_USE_FRAMEWORKS)

     STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir
${QT_QTCORE_INCLUDE_DIR})
     SET( QT_INCLUDE_DIR ${qt4_include_dir} CACHE PATH "")
   ENDIF (QT_USE_FRAMEWORKS)
 ENDIF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR)

It works fine on Linux with the same version of CMake distribution.
Does anyone have an idea of where this problem could come from ?

Regards,

--
Jabber ID : [EMAIL PROTECTED]
tel : +33 6 86 75 99 35
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to