[CMake] Advanced cmake in Nepomuk-KDE: changing vars at build time

Sebastian Trüg strueg at mandriva.com
Tue Dec 5 05:39:12 EST 2006


Hi,

I have the following problem:

In the Nepomuk-KDE module (for reference see the KDE svn at 
trunk/playground/base/nepomuk-kde/kmetadata) I have a library and a tool that 
creates a bunch of source and header files from an RDF ontology. I don't have 
the full list of sources and headers beforehand. So I create this list with 
the same tool. The problem is that the tool has to be compiled before it can 
create the list. Using ADD_CUSTOM_COMMAND and a dummy source file creating 
the sources at compile time is no problem but the target of the library does 
not contain the source files.

So the question is: can I change the list of files to be compiled and 
installed at compile time? Or if not is is possible to compile the tool at 
cmake runtime? Or force two cmake runs to first build the tool and then the 
actual lib?

Thanks a lot,
Sebastian Trueg


More information about the CMake mailing list