diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2007-03-15 12:10:07 +0000 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2007-03-15 12:10:07 +0000 |
commit | a2d6c5ebc6a357b6c21d70b2d75e171b75657cb3 (patch) | |
tree | 986f4969681ee4c960436178f59373b0aac0afb9 | |
parent | d6387f4aae4b537793727efd9345db78b45c4d6b (diff) |
* cmake\doc\CMakeLists.txt: added prelimary xml doc support, needs cmake find script.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | cmake/CMakeLists.txt | 3 | ||||
-rw-r--r-- | cmake/doc/CMakeLists.txt | 76 |
3 files changed, 78 insertions, 6 deletions
@@ -1,3 +1,8 @@ +2007-03-15 Ralf.Habacker <ralf.habacker@freenet.de> + + * cmake\doc\CMakeLists.txt: added prelimary xml doc + support, needs cmake Find script. + 2007-03-14 Ralf.Habacker <ralf.habacker@freenet.de> * cmake: add doxygen support diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index e682a17b..ccd63e01 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -225,9 +225,6 @@ OPTION(DBUS_DISABLE_ASSERTS "Disable assertion checking" OFF) #AC_ARG_ENABLE(checks, AS_HELP_STRING([--enable-checks],[include sanity checks on public API]),enable_checks=$enableval,enable_checks=yes) OPTION(DBUS_DISABLE_CHECKS "Disable public API sanity checking" OFF) -#AC_ARG_ENABLE(xml-docs, AS_HELP_STRING([--enable-xml-docs],[build XML documentation (requires xmlto)]),enable_xml_docs=$enableval,enable_xml_docs=auto) -#xmldocs missing - #AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],[compile with coverage profiling instrumentation (gcc only)]),enable_gcov=$enableval,enable_gcov=no) OPTION(DBUS_GCOV_ENABLED "compile with coverage profiling instrumentation (gcc only)" OFF) if(DBUS_GCOV_ENABLED) diff --git a/cmake/doc/CMakeLists.txt b/cmake/doc/CMakeLists.txt index 88ef67a8..dd46708b 100644 --- a/cmake/doc/CMakeLists.txt +++ b/cmake/doc/CMakeLists.txt @@ -4,11 +4,81 @@ if(DOXYGEN_EXECUTABLE) OPTION(DBUS_ENABLE_DOXYGEN_DOCS "build DOXYGEN documentation (requires Doxygen)" ON) endif(DOXYGEN_EXECUTABLE) - -set (top_srcdir ${CMAKE_SOURCE_DIR}/..) -configure_file(${CMAKE_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_BINARY_DIR}/Doxyfile ) if (DBUS_ENABLE_DOXYGEN_DOCS) + set (top_srcdir ${CMAKE_SOURCE_DIR}/..) + configure_file(${CMAKE_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_BINARY_DIR}/Doxyfile ) add_custom_target(doc COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile ) endif (DBUS_ENABLE_DOXYGEN_DOCS) + +#AC_ARG_ENABLE(xml-docs, AS_HELP_STRING([--enable-xml-docs],[build XML documentation (requires xmlto)]),enable_xml_docs=$enableval,enable_xml_docs=auto) +#xmldocs missing + +# depends on xmlto +set(DBUS_XML_DOCS_ENABLED 0) + +set (EXTRA_DIST + busconfig.dtd + introspect.dtd + dbus-faq.xml + dbus-specification.xml + dbus-test-plan.xml + dbus-tutorial.xml + dcop-howto.txt + file-boilerplate.c + introspect.xsl +) + +set (HTML_FILES + dbus-faq.html + dbus-specification.html + dbus-test-plan.html + dbus-tutorial.html +) + +if (DBUS_XML_DOCS_ENABLED) + +macro (DOCBOOK _sources _options) + get_filename_component(_tmp_FILE ${_sources} ABSOLUTE) + get_filename_component(_basename ${_tmp_FILE} NAME_WE) + set(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.html) + MESSAGE (${_header} ${_sources} ${_options} ${_basename}) + + ADD_CUSTOM_TARGET(${_basename}.html ALL + xmlto.bat ${_sources} +# xmlto.bat ${_options} ${_sources} + DEPENDS ${_sources} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) +endmacro (DOCBOOK) + +### copy tests to builddir so that generated tests and static tests +### are all in one place. +### todo how to add more filetypes +MACRO (COPYDIR _src _type) + FOREACH(FILE_TYPE ${_type}) + FOREACH(DIR ${_src}) + FILE(GLOB FILES "${CMAKE_SOURCE_DIR}/../${DIR}/${FILE_TYPE}" ) + FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${DIR}) + FOREACH(FILE ${FILES}) + GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME) + SET (TARGET ${CMAKE_BINARY_DIR}/${DIR}/${FILENAME}) + configure_file(${FILE} ${TARGET} COPYONLY) + IF (CONFIG_VERBOSE) + MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n") + ENDIF (CONFIG_VERBOSE) + ENDFOREACH(FILE) + ENDFOREACH(DIR) + ENDFOREACH(FILE_TYPE) +ENDMACRO (COPYDIR) + +COPYDIR(doc *.png) +COPYDIR(doc *.svg) + +DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-test-plan.xml html-nochunks) +DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-tutorial.xml html-nochunks) +DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-specification.xml html-nochunks) +DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-faq.xml html-nochunks) + +endif(DBUS_XML_DOCS_ENABLED) |