[CMake] Processing new extensions with cmake

Michael Biebl mbiebl at gmail.com
Mon Apr 10 22:13:11 EDT 2006


Hi all,

automake has the nice ability, to define handlers for new extensions.
I currently use that for a project, which builds a binary called
install_service, and this binary is used to process *.ii files and
produce *.i files from that. The resulting *.i files will be
installed.

These rules look like that:

%.i: $(srcdir)/%.ii: $(top_builddir)/tools/install_service
        $(top_builddir)/tools/install_service -i $< -o $@

CLEANFILES = *.i


iifiles = test.ii
iconf_DATA = $(iifiles:.ii=.i)
EXTRA_DIST = $(iifiles)

I want to achieve the same with cmake (2.2). Is that possible and how
could I do that?
I already looked at KDE3Macros.cmake/KDE3_ADD_MOC_FILES, but this does
not really work for me because I don't have an exiting executable
target where I simply add an additional source file before building.

I'm grateful for any help,
Michael


More information about the CMake mailing list