On 09.07.07 15:42:08, Dirk Mueller wrote: > On Friday, 6. July 2007, Andreas Pakulat wrote: > > > Thats not feasible, because some of the sources (though not all) may be > > generated (or may be not generated if the generator is missing) and thus > > I'd have to copy the generation code into each CMakeLists.txt that wants > > to use the sources. > > Ehm, parse error here. you only have to SET a variable and use that one in > other places. Unless I'm missing something.
Yeap you are. I tried that and this doesn't work because in subdirectories its not visible anymore that the files are generated. For example I have python/CMakeLists.txt with set_source_files_properties( ${foo_SRCS} GENERATED ) python/parser/CMakeLists.txt with add_executable(python-parser ${foo_SRCS} ) Then cmake will complain that it doesn't know how to create the files in foo_SRCS for the python-parser target. And always setting the foo_SRCS GENERATED in the subdirs is not really usable either as they are only generated when you've got the generator tool installed (which is not required). So I'd again need to have if(FOO_FOUND) stuff everywhere. The only alternative I see is using foo_generated_SRCS and foo_SRCS and only one of them will contain files and then in each CMakeLists.txt set foo_generated_SRCS propreties to GENERATED. Not nice either. Andreas -- Stay away from hurricanes for a while. _______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem