[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/akonadi/agents/nie
From: Harald Fernengel <harry () kdevelop ! org>
Date: 2008-08-09 16:17:26
Message-ID: 1218298646.467002.14725.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 844408 by harald:
INTEGRATION:/branches/KDE/4.1/kdepim/akonadi/agents/nie 844405
fix the nepomuk-rcgen detection if kdepim is not installed into KDEDIR. Done with \
I-know-cmake Alex
M +8 -1 CMakeLists.txt
M +27 -36 rcgen.cmake
--- trunk/KDE/kdepim/akonadi/agents/nie/CMakeLists.txt #844407:844408
@@ -90,6 +90,13 @@
${CMAKE_CURRENT_BINARY_DIR}/website.cpp
)
+# finds nepomuk-rcgen in BIN_INSTALL_DIR, then in the others
+find_program(_rcgen nepomuk-rcgen PATHS ${BIN_INSTALL_DIR} NO_DEFAULT_PATH)
+find_program(_rcgen nepomuk-rcgen)
+if(NOT _rcgen)
+ message(FATAL_ERROR "Failed to find the Nepomuk source generator. Did you install \
Soprano?" ) +endif(NOT _rcgen)
+
add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/out_headers
@@ -98,7 +105,7 @@
${nie_SRCS}
COMMAND ${CMAKE_COMMAND}
ARGS
- -DBIN_INSTALL_DIR=${BIN_INSTALL_DIR}
+ -D_rcgen=${_rcgen}
-Dontofile1=${CMAKE_CURRENT_SOURCE_DIR}/nie.rdfs
-Dontofile2=${CMAKE_CURRENT_SOURCE_DIR}/nco.rdfs
-Dontofile3=${CMAKE_CURRENT_SOURCE_DIR}/nmo.rdfs
--- trunk/KDE/kdepim/akonadi/agents/nie/rcgen.cmake #844407:844408
@@ -1,54 +1,45 @@
# a CMake script. envoke with the -P option
# must define
-# BIN_INSTALL_DIR
# targetdir
# ontofile1, ontofile2, ontofile3, ontofile4
+# _rcgen
-FIND_PROGRAM(_rcgen nepomuk-rcgen PATHS ${BIN_INSTALL_DIR} NO_DEFAULT_PATH)
+file(TO_NATIVE_PATH ${_rcgen} _rcgen)
-if(NOT _rcgen)
+execute_process(
+ COMMAND ${_rcgen} --listheaders --prefix ${targetdir}/ --ontologies ${ontofile1} \
${ontofile2} ${ontofile3} ${ontofile4} + OUTPUT_VARIABLE _out_headers
+ RESULT_VARIABLE _rcgen_result
+ ERROR_QUIET
+ )
+file(WRITE ${targetdir}/out_headers "${_out_headers}")
- message(FATAL_ERROR "Failed to find the Nepomuk source generator. Did you install \
Soprano?" ) +# If the first call succeeds it is very very likely that the rest will, \
too +if(${_rcgen_result} EQUAL 0)
-else(NOT _rcgen)
+ execute_process(
+ COMMAND ${_rcgen} --listsources --prefix ${targetdir}/ --ontologies ${ontofile1} \
${ontofile2} ${ontofile3} ${ontofile4} + OUTPUT_VARIABLE _out_sources
+ ERROR_QUIET
+ )
+ file(WRITE ${targetdir}/out_sources "${_out_sources}")
- FILE(TO_NATIVE_PATH ${_rcgen} _rcgen)
+ execute_process(
+ COMMAND ${_rcgen} --listincludes --ontologies ${ontofile1} ${ontofile2} \
${ontofile3} ${ontofile4} + OUTPUT_VARIABLE _out_includes
+ ERROR_QUIET
+ )
+ file(WRITE ${targetdir}/out_includes "${_out_includes}")
execute_process(
- COMMAND ${_rcgen} --listheaders --prefix ${targetdir}/ --ontologies ${ontofile1} \
${ontofile2} ${ontofile3} ${ontofile4}
- OUTPUT_VARIABLE _out_headers
- RESULT_VARIABLE _rcgen_result
+ COMMAND ${_rcgen} --writeall --templates "DUMMY" --target ${targetdir}/ \
--ontologies ${ontofile1} ${ontofile2} ${ontofile3} ${ontofile4} ERROR_QUIET
)
- file(WRITE ${targetdir}/out_headers "${_out_headers}")
- # If the first call succeeds it is very very likely that the rest will, too
- if(${_rcgen_result} EQUAL 0)
+else(${_rcgen_result} EQUAL 0)
- execute_process(
- COMMAND ${_rcgen} --listsources --prefix ${targetdir}/ --ontologies \
${ontofile1} ${ontofile2} ${ontofile3} ${ontofile4}
- OUTPUT_VARIABLE _out_sources
- ERROR_QUIET
- )
- file(WRITE ${targetdir}/out_sources "${_out_sources}")
+ message(FATAL_ERROR "Failed to generate Nepomuk resource classes. Do you have a \
recent Soprano version?")
- execute_process(
- COMMAND ${_rcgen} --listincludes --ontologies ${ontofile1} ${ontofile2} \
${ontofile3} ${ontofile4}
- OUTPUT_VARIABLE _out_includes
- ERROR_QUIET
- )
- file(WRITE ${targetdir}/out_includes "${_out_includes}")
+endif(${_rcgen_result} EQUAL 0)
- execute_process(
- COMMAND ${_rcgen} --writeall --templates "DUMMY" --target ${targetdir}/ \
--ontologies ${ontofile1} ${ontofile2} ${ontofile3} ${ontofile4}
- ERROR_QUIET
- )
-
- else(${_rcgen_result} EQUAL 0)
-
- message(FATAL_ERROR "Failed to generate Nepomuk resource classes. Do you have a \
recent Soprano version?")
-
- endif(${_rcgen_result} EQUAL 0)
-
-endif(NOT _rcgen)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic