diff options
author | Sebastian Trueg <sebastian@trueg.de> | 2007-06-11 19:22:30 +0000 |
---|---|---|
committer | Sebastian Trueg <sebastian@trueg.de> | 2007-06-11 19:22:30 +0000 |
commit | b579d6c4002a3f3825e873dfcee815ba3696b10e (patch) | |
tree | 8ba48248bf314189c055f8e5e34401f73265cc0a /modules/NepomukMacros.cmake | |
parent | ed1c174157fc39738f8d5d7a2a5d8a10e33e95d5 (diff) | |
download | extra-cmake-modules-b579d6c4002a3f3825e873dfcee815ba3696b10e.tar.gz extra-cmake-modules-b579d6c4002a3f3825e873dfcee815ba3696b10e.tar.bz2 |
- Merged KMetaData, Konto, and KNepomuk into one nepomuk folder with two libs:
1. libnepomuk now contains KMetaData and Konto, only using one single namespace "Nepomuk"
2. libnepomuk-middleware is now what knepomuk was before and has the namespace "Nepomuk::Middleware"
This makes the design much cleaner and less confusing since we have one name for everything: Nepomuk.
I was not happy with Braid and we did not find another name so I stick to Nepomuk now. In the end people
now already now this stuff as Nepomuk and it makes the project happy. ;)
CCMAIL: nepomuk-kde.semanticdesktop.org
svn path=/trunk/KDE/kdelibs/; revision=674110
Diffstat (limited to 'modules/NepomukMacros.cmake')
-rw-r--r-- | modules/NepomukMacros.cmake | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/modules/NepomukMacros.cmake b/modules/NepomukMacros.cmake new file mode 100644 index 00000000..af534451 --- /dev/null +++ b/modules/NepomukMacros.cmake @@ -0,0 +1,49 @@ +# This file contains the following macros: +# +# NEPOMUK_GENERATE_FROM_ONTOLOGY +# + + +# +# NEPOMUK_GENERATE_FROM_ONTOLOGY +# (C) 2007 Sebastian Trueg <trueg@kde.org> +# +# Parameters: +# ontofile - Path to the NRL ontology defining the resources to be generated. +# targetdir - Folder to which the generated sources should be written. +# out_headers - Variable which will be filled with the names of all generated headers. +# out_sources - Variable which will be filled with the names of all generated sources. +# out_includes - Variable which will be filled with complete include statements of all +# generated resource classes. +# +# In addition to the parameters an arbitrary number of template filenames can be set as arguments +# +macro(NEPOMUK_GENERATE_FROM_ONTOLOGY ontofile targetdir out_headers out_sources out_includes) + + FIND_PROGRAM(RCGEN nepomuk-rcgen PATHS ${BIN_INSTALL_DIR}) + if(RCGEN-NOTFOUND) + message( FATAL_ERROR "Failed to find the KMetaData source generator" ) + endif(RCGEN-NOTFOUND) + + FILE(TO_NATIVE_PATH ${RCGEN} RCGEN) + + execute_process( + COMMAND ${RCGEN} --listheaders --prefix ${targetdir}/ --ontologies ${ontofile} + OUTPUT_VARIABLE ${out_headers} + ) + + execute_process( + COMMAND ${RCGEN} --listsources --prefix ${targetdir}/ --ontologies ${ontofile} + OUTPUT_VARIABLE ${out_sources} + ) + + execute_process( + COMMAND ${RCGEN} --listincludes --ontologies ${ontofile} + OUTPUT_VARIABLE ${out_includes} + ) + + execute_process( + COMMAND ${RCGEN} --writeall --templates ${ARGN} --target ${targetdir}/ --ontologies ${ontofile} + ) + +endmacro(NEPOMUK_GENERATE_FROM_ONTOLOGY) |