## find_package(Doxygen QUIET) if(DOXYGEN_FOUND) # click+jump in Emacs and Visual Studio (for doxy.config) (jw) if(CMAKE_BUILD_TOOL MATCHES "msdev|devenv") set(DOXY_WARN_FORMAT "\"$file($line) : $text \"") else() set(DOXY_WARN_FORMAT "\"$file:$line: $text \"") endif() set(DOXY_INPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(DOXY_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}) # we need latex for doxygen because of the formulas #find_package(LATEX) #if(NOT LATEX_COMPILER) # message(STATUS "latex command LATEX_COMPILER not found but usually required. You will probably get warnings and user inetraction on doxy run.") #endif(NOT LATEX_COMPILER) #if(NOT MAKEINDEX_COMPILER) # message(STATUS "makeindex command MAKEINDEX_COMPILER not found but usually required.") #endif(NOT MAKEINDEX_COMPILER) #if(NOT DVIPS_CONVERTER) # message(STATUS "dvips command DVIPS_CONVERTER not found but usually required.") #endif(NOT DVIPS_CONVERTER) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in ${CMAKE_CURRENT_BINARY_DIR}/doxy.config @ONLY) # use (configured) doxy.config from (out of place) BUILD tree: set(DOXY_CONFIG ${CMAKE_CURRENT_BINARY_DIR}/doxy.config) else() message(STATUS "Warning: Could not find dox.config.in in the root directory.") endif() add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG}) # create a windows help .chm file using hhc.exe # HTMLHelp DLL must be in path! # fallback: use hhw.exe interactively if(WIN32) find_package(HTMLHelp) if(HTML_HELP_COMPILER) set(TMP ${DOXY_OUTPUT_DIR}/html/index.hhp) string(REGEX REPLACE "/" "\\\\" HHP_FILE ${TMP}) add_custom_target(chmdoc ${HTML_HELP_COMPILER} ${HHP_FILE}) add_dependencies(chmdoc doc) # Adding a dependency somehow adds doc target as default build target set_target_properties(doc chmdoc PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE) endif(HTML_HELP_COMPILER) endif(WIN32) # Installation install( FILES ${DOXY_CONFIG} ${CMAKE_CURRENT_BINARY_DIR}/doxy.log DESTINATION ${PIXHAWK_DOC_INSTALL_PATH}/api OPTIONAL ) # Install command always needs the directory to work if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/html) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html) endif() install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${PIXHAWK_DOC_INSTALL_PATH}/api ) endif(DOXYGEN_FOUND)