summaryrefslogtreecommitdiff
path: root/swig/ruby
diff options
context:
space:
mode:
authorKlaus Kämpf <kkaempf@suse.de>2010-11-09 10:12:57 +0100
committerKlaus Kämpf <kkaempf@suse.de>2010-11-09 10:12:57 +0100
commitb782377a23276a95c0acd79925f9f39fd67e939e (patch)
treea50469db7935d4faee4882782fbd646019f9b5a9 /swig/ruby
parent04ac988d9c685b562ba1141bf455a5ba047410b6 (diff)
downloadlibzypp-bindings-b782377a23276a95c0acd79925f9f39fd67e939e.tar.gz
libzypp-bindings-b782377a23276a95c0acd79925f9f39fd67e939e.tar.bz2
libzypp-bindings-b782377a23276a95c0acd79925f9f39fd67e939e.zip
Enable rdoc documentation
Diffstat (limited to 'swig/ruby')
-rw-r--r--swig/ruby/CMakeLists.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/swig/ruby/CMakeLists.txt b/swig/ruby/CMakeLists.txt
index 27a7cf6..5623269 100644
--- a/swig/ruby/CMakeLists.txt
+++ b/swig/ruby/CMakeLists.txt
@@ -36,3 +36,24 @@ TARGET_LINK_LIBRARIES( zypp_ruby ${RUBY_LIBRARY} )
TARGET_LINK_LIBRARIES( zypp_ruby ${ZYPP_LIBRARY} )
INSTALL(TARGETS zypp_ruby LIBRARY DESTINATION ${RUBY_VENDORARCH_DIR})
+
+#
+# Generate HTML documentation with rdoc
+#
+# This requires rdoc-swig from https://github.com/kkaempf/rdoc-swig
+#
+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})