[CMake] Adding non-compiled files to project?

Mike Arthur mike at mikearthur.co.uk
Mon Jun 23 12:43:29 EDT 2008


On Monday 23 June 2008 17:30:21 Timenkov Yuri wrote:
> Hmm, I don't think this should be a big deal:
>
> qt4_wrap_cpp(MyApp_MOC_SRCS ${MyApp_HDRS})
> source_group("Autogenerated MOC files" FILES ${MyApp_MOC_SRCS})
>
> I didn't try it, but this should work :)
> My be it worth filing feature request to bug tracker: automatically add Moc
> and UI files to such group in FindQt4.cmake like qmake does.
set(Common_MOC_HDRS ../../include/Common/AbstractMetadata.h)
qt4_wrap_cpp(Common_MOC_SRCS ${Common_MOC_HDRS})
add_library(Common ${Common_SRCS} ${Common_MOC_SRCS})
source_group("MOC Files\\Generated Files" FILES ${Common_MOC_SRCS})

No luck doing that in CMake 2.6.
-- 
Cheers,
Mike Arthur


More information about the CMake mailing list