From b579d6c4002a3f3825e873dfcee815ba3696b10e Mon Sep 17 00:00:00 2001 From: Sebastian Trueg Date: Mon, 11 Jun 2007 19:22:30 +0000 Subject: - 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 --- modules/NepomukMacros.cmake | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 modules/NepomukMacros.cmake (limited to 'modules/NepomukMacros.cmake') 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 +# +# 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) -- cgit v1.2.1 From a91a8972129f5f408779aac7d962e7b26a28b211 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Wed, 27 Jun 2007 18:24:55 +0000 Subject: Minor svn path=/trunk/KDE/kdelibs/; revision=681013 --- modules/NepomukMacros.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/NepomukMacros.cmake') diff --git a/modules/NepomukMacros.cmake b/modules/NepomukMacros.cmake index af534451..9476cf64 100644 --- a/modules/NepomukMacros.cmake +++ b/modules/NepomukMacros.cmake @@ -21,9 +21,9 @@ 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) + if(NOT RCGEN) message( FATAL_ERROR "Failed to find the KMetaData source generator" ) - endif(RCGEN-NOTFOUND) + endif(NOT RCGEN) FILE(TO_NATIVE_PATH ${RCGEN} RCGEN) -- cgit v1.2.1 From c32d4c98e1d154025d68baa0fa837e99fce86b15 Mon Sep 17 00:00:00 2001 From: Sebastian Trueg Date: Sat, 2 Feb 2008 16:23:27 +0000 Subject: Use the new --quiet parameter to suppress useless output svn path=/trunk/KDE/kdelibs/; revision=770030 --- modules/NepomukMacros.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/NepomukMacros.cmake') diff --git a/modules/NepomukMacros.cmake b/modules/NepomukMacros.cmake index 9476cf64..00771ae6 100644 --- a/modules/NepomukMacros.cmake +++ b/modules/NepomukMacros.cmake @@ -28,22 +28,22 @@ macro(NEPOMUK_GENERATE_FROM_ONTOLOGY ontofile targetdir out_headers out_sources FILE(TO_NATIVE_PATH ${RCGEN} RCGEN) execute_process( - COMMAND ${RCGEN} --listheaders --prefix ${targetdir}/ --ontologies ${ontofile} + COMMAND ${RCGEN} --quiet --listheaders --prefix ${targetdir}/ --ontologies ${ontofile} OUTPUT_VARIABLE ${out_headers} ) execute_process( - COMMAND ${RCGEN} --listsources --prefix ${targetdir}/ --ontologies ${ontofile} + COMMAND ${RCGEN} --quiet --listsources --prefix ${targetdir}/ --ontologies ${ontofile} OUTPUT_VARIABLE ${out_sources} ) execute_process( - COMMAND ${RCGEN} --listincludes --ontologies ${ontofile} + COMMAND ${RCGEN} --quiet --listincludes --ontologies ${ontofile} OUTPUT_VARIABLE ${out_includes} ) execute_process( - COMMAND ${RCGEN} --writeall --templates ${ARGN} --target ${targetdir}/ --ontologies ${ontofile} + COMMAND ${RCGEN} --quiet --writeall --templates ${ARGN} --target ${targetdir}/ --ontologies ${ontofile} ) endmacro(NEPOMUK_GENERATE_FROM_ONTOLOGY) -- cgit v1.2.1 From 1ed1dcce2c979c8b706f81a042c712e2fb00cef0 Mon Sep 17 00:00:00 2001 From: Sebastian Trueg Date: Sat, 2 Feb 2008 21:47:29 +0000 Subject: Reverted to version without --quiet parameter to be backwards compatible svn path=/trunk/KDE/kdelibs/; revision=770138 --- modules/NepomukMacros.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/NepomukMacros.cmake') diff --git a/modules/NepomukMacros.cmake b/modules/NepomukMacros.cmake index 00771ae6..9476cf64 100644 --- a/modules/NepomukMacros.cmake +++ b/modules/NepomukMacros.cmake @@ -28,22 +28,22 @@ macro(NEPOMUK_GENERATE_FROM_ONTOLOGY ontofile targetdir out_headers out_sources FILE(TO_NATIVE_PATH ${RCGEN} RCGEN) execute_process( - COMMAND ${RCGEN} --quiet --listheaders --prefix ${targetdir}/ --ontologies ${ontofile} + COMMAND ${RCGEN} --listheaders --prefix ${targetdir}/ --ontologies ${ontofile} OUTPUT_VARIABLE ${out_headers} ) execute_process( - COMMAND ${RCGEN} --quiet --listsources --prefix ${targetdir}/ --ontologies ${ontofile} + COMMAND ${RCGEN} --listsources --prefix ${targetdir}/ --ontologies ${ontofile} OUTPUT_VARIABLE ${out_sources} ) execute_process( - COMMAND ${RCGEN} --quiet --listincludes --ontologies ${ontofile} + COMMAND ${RCGEN} --listincludes --ontologies ${ontofile} OUTPUT_VARIABLE ${out_includes} ) execute_process( - COMMAND ${RCGEN} --quiet --writeall --templates ${ARGN} --target ${targetdir}/ --ontologies ${ontofile} + COMMAND ${RCGEN} --writeall --templates ${ARGN} --target ${targetdir}/ --ontologies ${ontofile} ) endmacro(NEPOMUK_GENERATE_FROM_ONTOLOGY) -- cgit v1.2.1 From e5c7745dccc9b29354812f53edb77163574028ae Mon Sep 17 00:00:00 2001 From: Sebastian Trueg Date: Mon, 11 Feb 2008 17:29:18 +0000 Subject: Make it possible to get the result from the nepomuk code gen call svn path=/trunk/KDE/kdelibs/; revision=773741 --- modules/NepomukMacros.cmake | 64 ++++++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 21 deletions(-) (limited to 'modules/NepomukMacros.cmake') diff --git a/modules/NepomukMacros.cmake b/modules/NepomukMacros.cmake index 9476cf64..18aeca27 100644 --- a/modules/NepomukMacros.cmake +++ b/modules/NepomukMacros.cmake @@ -18,32 +18,54 @@ # # In addition to the parameters an arbitrary number of template filenames can be set as arguments # +# In case of success NEPOMUK_RESOURCES_GENERATED is true, otherwise false +# macro(NEPOMUK_GENERATE_FROM_ONTOLOGY ontofile targetdir out_headers out_sources out_includes) + # init + set(NEPOMUK_RESOURCES_GENERATED false) + FIND_PROGRAM(RCGEN nepomuk-rcgen PATHS ${BIN_INSTALL_DIR}) + if(NOT RCGEN) - message( FATAL_ERROR "Failed to find the KMetaData source generator" ) - endif(NOT RCGEN) - FILE(TO_NATIVE_PATH ${RCGEN} RCGEN) + message(STATUS "Failed to find the Nepomuk source generator" ) - 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} - ) + else(NOT RCGEN) + + FILE(TO_NATIVE_PATH ${RCGEN} RCGEN) + + execute_process( + COMMAND ${RCGEN} --listheaders --prefix ${targetdir}/ --ontologies ${ontofile} + OUTPUT_VARIABLE ${out_headers} + RESULT_VARIABLE rcgen_result + ) + + # If the first call succeeds it is very very likely that the rest will, too + if(${rcgen_result} EQUAL 0) + + 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} + ) + + set(NEPOMUK_RESOURCES_GENERATED true) + + else(${rcgen_result} EQUAL 0) + + message(STATUS "Failed to generate Nepomuk resource classes.") + + endif(${rcgen_result} EQUAL 0) + + endif(NOT RCGEN) endmacro(NEPOMUK_GENERATE_FROM_ONTOLOGY) -- cgit v1.2.1 From 2a7e5d68444a42f38f1e093155fc3516a6036384 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Mon, 16 Jun 2008 00:29:35 +0000 Subject: make sure to search only in ${BIN_INSTALL_DIR} for nepomuk-rcgen, just in case there are other versions lying around out there. svn path=/trunk/KDE/kdelibs/; revision=820994 --- modules/NepomukMacros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/NepomukMacros.cmake') diff --git a/modules/NepomukMacros.cmake b/modules/NepomukMacros.cmake index 18aeca27..0e1fe45b 100644 --- a/modules/NepomukMacros.cmake +++ b/modules/NepomukMacros.cmake @@ -25,7 +25,7 @@ macro(NEPOMUK_GENERATE_FROM_ONTOLOGY ontofile targetdir out_headers out_sources # init set(NEPOMUK_RESOURCES_GENERATED false) - FIND_PROGRAM(RCGEN nepomuk-rcgen PATHS ${BIN_INSTALL_DIR}) + FIND_PROGRAM(RCGEN nepomuk-rcgen PATHS ${BIN_INSTALL_DIR} NO_DEFAULT_PATH) if(NOT RCGEN) -- cgit v1.2.1 From b190b964ae523a1f9244f53ac960b952d63daa5c Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 16 Jun 2008 22:05:02 +0000 Subject: -first search in KDE4_BIN_INSTALL_DIR, since this is most probably where rcgen is to find -lowercase find_program() -fix documentation format Alex CCMAIL: svn path=/trunk/KDE/kdelibs/; revision=821234 --- modules/NepomukMacros.cmake | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'modules/NepomukMacros.cmake') diff --git a/modules/NepomukMacros.cmake b/modules/NepomukMacros.cmake index 0e1fe45b..14acd2bb 100644 --- a/modules/NepomukMacros.cmake +++ b/modules/NepomukMacros.cmake @@ -1,13 +1,6 @@ # This file contains the following macros: # # NEPOMUK_GENERATE_FROM_ONTOLOGY -# - - -# -# NEPOMUK_GENERATE_FROM_ONTOLOGY -# (C) 2007 Sebastian Trueg -# # Parameters: # ontofile - Path to the NRL ontology defining the resources to be generated. # targetdir - Folder to which the generated sources should be written. @@ -19,13 +12,16 @@ # In addition to the parameters an arbitrary number of template filenames can be set as arguments # # In case of success NEPOMUK_RESOURCES_GENERATED is true, otherwise false -# + +# (C) 2007 Sebastian Trueg + + macro(NEPOMUK_GENERATE_FROM_ONTOLOGY ontofile targetdir out_headers out_sources out_includes) # init set(NEPOMUK_RESOURCES_GENERATED false) - FIND_PROGRAM(RCGEN nepomuk-rcgen PATHS ${BIN_INSTALL_DIR} NO_DEFAULT_PATH) + find_program(RCGEN nepomuk-rcgen PATHS ${KDE4_BIN_INSTALL_DIR} ${BIN_INSTALL_DIR} NO_DEFAULT_PATH) if(NOT RCGEN) -- cgit v1.2.1