# -helper macro to add a "doc" target with CMake build system.
# and configure doxy.config.in to doxy.config
#
# target "doc" allows building the documentation with doxygen/dot on WIN32 and Linux
# Creates .chm windows help file if MS HTML help workshop
# (available from http://msdn.microsoft.com/workshop/author/htmlhelp)
# is installed with its DLLs in PATH.
#
#
# Please note, that the tools, e.g.:
# doxygen, dot, latex, dvips, makeindex, gswin32, etc.
# must be in path.
#
# Note about Visual Studio Projects:
# MSVS hast its own path environment which may differ from the shell.
# See "Menu Tools/Options/Projects/VC++ Directories" in VS 7.1
#
# author Jan Woetzel 2004-2006
# www.mip.informatik.uni-kiel.de/~jw
FIND_PACKAGE(Doxygen)
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(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
SET(DOXY_WARN_FORMAT "\"$file:$line: $text \"")
ENDIF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
# 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)
# This macro generates a new doc target. acg_create_doc_target( targetName [directory with the doxy.config.in] [dependency])
# if no parameter is used except the target, a target of the given name will be created from the current source directories doxyfile and added as a dependency to the doc target
# The first additional parameter is used to specify a directory where the doxyfile will be used
# The second parameter defines a target, that will depend on the newly generated one. (Default is doc)
macro(acg_create_doc_target target)
set( DOC_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
set( DOC_DEPENDENCY "doc")
# collect arguments
if(${ARGC} EQUAL 2)
set( DOC_DIRECTORY "${ARGV1}")
elseif(${ARGC} EQUAL 3)
set( DOC_DIRECTORY "${ARGV1}")
set( DOC_DEPENDENCY "${ARGV2}")
elseif( $ARGC GREATER 3 )
set( DOC_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
# failed as we do not know how to handle the parameters
MESSAGE(SEND_ERROR "Unknown parameter for acg_create_doc_target!")
endif()
# If there exists an doxy.config.in, we configure it.
# -helper macro to add a "doc" target with CMake build system.
# and configure doxy.config.in to doxy.config
#
# target "doc" allows building the documentation with doxygen/dot on WIN32 and Linux
# Creates .chm windows help file if MS HTML help workshop
# (available from http://msdn.microsoft.com/workshop/author/htmlhelp)
# is installed with its DLLs in PATH.
#
#
# Please note, that the tools, e.g.:
# doxygen, dot, latex, dvips, makeindex, gswin32, etc.
# must be in path.
#
# Note about Visual Studio Projects:
# MSVS hast its own path environment which may differ from the shell.
# See "Menu Tools/Options/Projects/VC++ Directories" in VS 7.1
#
# author Jan Woetzel 2004-2006
# www.mip.informatik.uni-kiel.de/~jw
FIND_PACKAGE(Doxygen)
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(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
SET(DOXY_WARN_FORMAT "\"$file:$line: $text \"")
ENDIF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
# 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)
# This macro generates a new doc target. acg_create_doc_target( targetName [directory with the doxy.config.in] [dependency])
# if no parameter is used except the target, a target of the given name will be created from the current source directories doxyfile and added as a dependency to the doc target
# The first additional parameter is used to specify a directory where the doxyfile will be used
# The second parameter defines a target, that will depend on the newly generated one. (Default is doc)
macro(acg_create_doc_target target)
set( DOC_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
set( DOC_DEPENDENCY "doc")
# collect arguments
if(${ARGC} EQUAL 2)
set( DOC_DIRECTORY "${ARGV1}")
elseif(${ARGC} EQUAL 3)
set( DOC_DIRECTORY "${ARGV1}")
set( DOC_DEPENDENCY "${ARGV2}")
elseif( $ARGC GREATER 3 )
set( DOC_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
# failed as we do not know how to handle the parameters
MESSAGE(SEND_ERROR "Unknown parameter for acg_create_doc_target!")
endif()
# If there exists an doxy.config.in, we configure it.