summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Kämpf <kkaempf@suse.de>2010-11-08 21:04:31 +0100
committerKlaus Kämpf <kkaempf@suse.de>2010-11-08 21:04:31 +0100
commit7671f8ed7a91b587c08d67c77dd20cbe41ef4509 (patch)
tree784e1e06917cd79c2b1325fd1a2f1aba50ba0848
parentcd8e702b7d8b1e2536c95409256cac1347cc82a7 (diff)
downloadlibzypp-bindings-7671f8ed7a91b587c08d67c77dd20cbe41ef4509.tar.gz
libzypp-bindings-7671f8ed7a91b587c08d67c77dd20cbe41ef4509.tar.bz2
libzypp-bindings-7671f8ed7a91b587c08d67c77dd20cbe41ef4509.zip
Add ruby_rdoc make target
-rw-r--r--swig/ruby/CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/swig/ruby/CMakeLists.txt b/swig/ruby/CMakeLists.txt
index 27a7cf6..c8d12fd 100644
--- a/swig/ruby/CMakeLists.txt
+++ b/swig/ruby/CMakeLists.txt
@@ -36,3 +36,20 @@ TARGET_LINK_LIBRARIES( zypp_ruby ${RUBY_LIBRARY} )
TARGET_LINK_LIBRARIES( zypp_ruby ${ZYPP_LIBRARY} )
INSTALL(TARGETS zypp_ruby LIBRARY DESTINATION ${RUBY_VENDORARCH_DIR})
+
+# rdoc
+SET(rdoc_dir "${CMAKE_CURRENT_BINARY_DIR}/html")
+ADD_CUSTOM_COMMAND (
+ OUTPUT ${rdoc_dir}
+ COMMAND ${CMAKE_COMMAND} -E echo_append "Creating rdoc documentation ..."
+ COMMAND rm -rf ${rdoc_dir}
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/rdoc -o ${rdoc_dir} zypp.i *.i ruby/*.i
+ COMMAND ${CMAKE_COMMAND} -E echo "Done."
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/swig
+ DEPENDS ${CMAKE_SOURCE_DIR}/swig/*.i ${CMAKE_SOURCE_DIR}/swig/ruby/*.rb ${CMAKE_SOURCE_DIR}/swig/ruby/*.i
+)
+ADD_CUSTOM_TARGET(ruby_rdoc ALL DEPENDS "${rdoc_dir}")
+
+#
+# Leave this to %doc in the .spec file
+#INSTALL(DIRECTORY "${rdoc_dir}" DESTINATION ${DOC_INSTALL_DIR})