On Monday 09 June 2008, Steven Van Ingelgem wrote: > I am building an executable which I need to pre-process some files (much > like QT does).
You mean like moc, which is then used to generate source which will be built ? You don't have to do that at cmake time, you can do this at build time. With moc it would look like: add_executable(moc ${mocSources}) get_target_property(MOC_EXECUTABLE moc LOCATION) ... add_custom_command(OUTPUT file.moc COMMAND ${MOC_EXECUTABLE} ... args... DEPENDS moc) The last "DEPENDS" tells cmake that the target "moc" has to be built before the custom command is executed. Alex _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake