[CMake] Qt and cmake - generating files order

William A. Hoffman billlist at nycap.rr.com
Mon Apr 17 09:51:03 EDT 2006


At 10:08 AM 4/16/2006, lemmel wrote:
>            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 ?

Add the ui_ .h file as part of the sources for reconin.  

-Bill



More information about the CMake mailing list