From 32a313d8301f0b391afb664d0e1d3fccaa7c7fcc Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Thu, 19 Jul 2012 15:53:39 +0200 Subject: [PATCH] Added DOCS_GENERATE_DOCSET option to generate Apple documentation sets. --- scripts/cmake/DocumentationSetup.cmake | 23 +++++++++++++++++++---- scripts/docs/Doxyfile.in | 6 +++--- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/scripts/cmake/DocumentationSetup.cmake b/scripts/cmake/DocumentationSetup.cmake index 4fbf26436bd..f07578fa294 100644 --- a/scripts/cmake/DocumentationSetup.cmake +++ b/scripts/cmake/DocumentationSetup.cmake @@ -1,10 +1,13 @@ -IF(DOXYGEN_FOUND) +IF(DOXYGEN_EXECUTABLE) OPTION(DOCS_GENERATE_DIAGRAMS "Use the DOT tool to generate class diagrams." OFF) OPTION(DOCS_GENERATE_CALL_GRAPHS "Generate call dependency graphs." OFF) OPTION(DOCS_GENERATE_COLLABORATION_GRAPHS "Generate collaboration graphs." OFF) + IF(APPLE) + OPTION(DOCS_GENERATE_DOCSET "Generate Apple Docsets." OFF) + ENDIF() # APPLE - IF(NOT DOT_TOOL_PATH AND (DOCS_GENERATE_DIAGRAMS OR DOCS_GENERATE_CALL_GRAPHS OR + IF(NOT DOT_TOOL_PATH AND (DOCS_GENERATE_DIAGRAMS OR DOCS_GENERATE_CALL_GRAPHS OR DOCS_GENERATE_COLLABORATION_GRAPHS)) MESSAGE(WARNING "The DOT tool was not found but is needed for generating doxygen diagrams!") ENDIF() # DOT_TOOL_PATH AND (DOCS_GENERATE_DIAGRAMS OR ...) @@ -17,10 +20,22 @@ IF(DOXYGEN_FOUND) SET(DOCS_GENERATE_COLLABORATION_GRAPHS_STRING "YES" CACHE INTERNAL "") ENDIF() # DOCS_GENERATE_COLLABORATION_GRAPHS - GET_FILENAME_COMPONENT(DOT_TOOL_PATH_ONLY ${DOT_TOOL_PATH} PATH) + # GET_FILENAME_COMPONENT(DOT_TOOL_PATH_ONLY ${DOT_TOOL_PATH} PATH) CONFIGURE_FILE(scripts/docs/Doxyfile.in ${PROJECT_BINARY_DIR}/Doxyfile) ADD_CUSTOM_TARGET(doc ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${PROJECT_BINARY_DIR} COMMENT "Generating source code documentation with Doxygen." VERBATIM) -ENDIF() # DOXYGEN_FOUND \ No newline at end of file + SET(DOCS_GENERATE_TREEVIEW_STRING "YES" CACHE INTERNAL "") + SET(DOCS_DISABLE_INDEX_STRING "NO" CACHE INTERNAL "") + IF(DOCS_GENERATE_DOCSET) + SET(DOCS_GENERATE_TREEVIEW_STRING "NO" CACHE INTERNAL "" FORCE) + SET(DOCS_DISABLE_INDEX_STRING "YES" CACHE INTERNAL "" FORCE) + SET(DOCS_GENERATE_DOCSET_STRING "YES" CACHE INTERNAL "") + ADD_CUSTOM_COMMAND(TARGET doc POST_BUILD + COMMAND make WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/docs + COMMENT "Generating docset ...") + ENDIF() # DOCS_GENERATE_DOCSET + + +ENDIF() # DOXYGEN_EXECUTABLE \ No newline at end of file diff --git a/scripts/docs/Doxyfile.in b/scripts/docs/Doxyfile.in index ddf8b9db2be..94958805606 100644 --- a/scripts/docs/Doxyfile.in +++ b/scripts/docs/Doxyfile.in @@ -817,7 +817,7 @@ HTML_DYNAMIC_SECTIONS = NO # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. -GENERATE_DOCSET = NO +GENERATE_DOCSET = ${DOCS_GENERATE_DOCSET_STRING} # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple @@ -930,7 +930,7 @@ QHG_LOCATION = # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. -DISABLE_INDEX = NO +DISABLE_INDEX = ${DOCS_DISABLE_INDEX_STRING} # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. @@ -952,7 +952,7 @@ ENUM_VALUES_PER_LINE = 4 # releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE # respectively. -GENERATE_TREEVIEW = YES +GENERATE_TREEVIEW = ${DOCS_GENERATE_TREEVIEW_STRING} # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree -- GitLab