[CMake] Qt and cmake - generating files order

lemmel lem__mel at hotmail.com
Sun Apr 16 10:08:45 EDT 2006


            Hi,
    I don't know if its me (I'm a new cmake user), but with this CMakeLists.txt :

# come from http://www.mail-archive.com/cmake@cmake.org/msg00841.html
PROJECT(reconin CXX C)

INCLUDE (  ${CMAKE_ROOT}/Modules/FindQt4.cmake  )
INCLUDE(   ${QT_USE_FILE}   )

SET(QtApp_MOCS src/GUI/InheritedDialog/MainWindow.h)
SET(QtApp_UICS src/GUI/UIfiles/FenetrePrincipale.ui)
SET(QtApp_SRCS src/main.cpp src/GUI/InheritedDialog/MainWindow.cpp)

QT4_WRAP_UI(QtApp_UIC_SRCS ${QtApp_UICS})
QT4_WRAP_CPP(QtApp_MOC_SRCS ${QtApp_MOCS})

ADD_EXECUTABLE(reconin ${QtApp_UIC_SRCS} ${QtApp_SRCS} ${QtApp_MOC_SRCS})

TARGET_LINK_LIBRARIES ( reconin ${QT_LIBRARIES}  )

I have an error during compilation "../../../ui_FenetrePrincipale.h : No file ou directory". This is look perfectly normal, for there is no generated ui_FenetrePrincipale.h. When, by hand, this file is generated, compilation run perfectly. (When I alter the ui file, I must generate .h by hand)
There is no problem with moc files.

What should I do ?

cmake version 2.2-patch 3 on testing/unstable Debian


More information about the CMake mailing list