[CMake] cmake can't find qt4
Mike Jackson
mike.jackson at imts.us
Tue Feb 6 13:06:37 EST 2007
I am not sure that CMake looks in /usr for Qt.
Do "QT4_DIR=/usr".
then do cmake and see what happens..
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
On Feb 6, 2007, at 12:09 PM, Marcin Gil wrote:
> I'm learning to use cmake for qt4 programs.
>
> in main directory CMakeLists.txt:
> -=
> PROJECT(dtmanager)
>
> FIND_PACKAGE(QT4 REQUIRED)
>
> ADD_SUBDIRECTORY(src)
> =-
>
> in src:
>
> -=
>
> INCLUDE(${QT_USE_FILE})
>
> INCLUDE_DIRECTORIES(
> ${CMAKE_CURRENT_BINARY_DIR}
> ${QT_INCLUDE_DIR}
> ${QT_QTNETWORK_INCLUDE_DIR}
> )
>
> SET(dtmanager_SRCS
> main.cpp
> )
>
> SET(dtmanager_UIS
> dtmanager.ui
> identities.ui
> )
>
> QT4_WRAP_UI(dtmanager_UIS_H ${dtmanager_UIS})
>
> QT4_AUTOMOC(${dtmanager_SRCS})
>
> ADD_EXECUTABLE(dtmanager ${dtmanager_SRCS} ${dtmanager_UIS_H})
>
> TARGET_LINK_LIBRARIES(dtmanager ${QT_LIBRARIES} $
> {QT_QTNETWORK_LIBRARIES})
> =-
>
>
> I receive:
>
> -- Check for working C compiler: /usr/bin/gcc
> -- Check for working C compiler: /usr/bin/gcc -- works
> -- Check size of void*
> -- Check size of void* - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> CMake Error: QT4_DIR is not set. It must be set to the directory
> containing
> QT4Config.cmake in order to use QT4.
> -- Configuring done
>
> And for sure I have qt 4.2.2 installed in /usr.
> I am using cmake 2.4.6
>
> What's wrong?
> -Marcin
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list