[CMake] qt .qrc file modifications require two builds

Glenn Hughes ghughes02138 at gmail.com
Tue Dec 15 19:12:36 EST 2009


If I modify my .qrc file, the first build regenerates the cxx output
file, but the cxx file itself is not compiled and linked in until I
build again.
Is there a way to add an additional dependency to allow the system to
realize that the cxx file needs a rebuild on the first pass?

The CMake script in question looks more or less like:

FILE (GLOB my_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "res/*.qrc"  )
QT4_ADD_RESOURCES( my_RESOURCES_SOURCES ${my_RESOURCES} )

...

ADD_EXECUTABLE( myApp MACOSX_BUNDLE ${mySrcs}  ${my_RESOURCES_SOURCES} )

Is there something else I should be doing? Building under Xcode.

Thanks!
G


More information about the CMake mailing list