2006-10-24 18:03:58 +04:00
|
|
|
# - This module looks for Doxygen and the path to Graphviz's dot
|
2006-10-04 19:04:26 +04:00
|
|
|
# Doxygen is a documentation generation tool see http://www.doxygen.org
|
2005-07-13 17:08:47 +04:00
|
|
|
# With the OS X GUI version, it likes to be installed to /Applications and
|
|
|
|
# it contains the doxygen executable in the bundle. In the versions I've
|
|
|
|
# seen, it is located in Resources, but in general, more often binaries are
|
2006-10-23 22:51:56 +04:00
|
|
|
# located in MacOS. This code sets the following variables:
|
|
|
|
# DOXYGEN_EXECUTABLE = The path to the doxygen command.
|
|
|
|
# DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen.
|
2006-10-24 18:03:58 +04:00
|
|
|
# DOXYGEN_DOT_PATH = The path to dot not including the executable
|
2006-10-23 22:51:56 +04:00
|
|
|
# DOXYGEN = same as DOXYGEN_EXECUTABLE for backwards compatibility
|
|
|
|
# DOT = same as DOXYGEN_DOT_EXECUTABLE for backwards compatibility
|
2006-10-16 18:47:18 +04:00
|
|
|
|
|
|
|
# The official Doxygen.app that is distributed for OS X uses non-standard
|
|
|
|
# conventions. Instead of the command-line "doxygen" tool being placed in
|
|
|
|
# Doxygen.app/Contents/MacOS, "Doxywizard" is placed there instead and
|
|
|
|
# "doxygen" is actually placed in Contents/Resources. This is most likely
|
|
|
|
# to accomodate people who double-click on the Doxygen.app package and expect
|
|
|
|
# to see something happen. However, the CMake backend gets horribly confused
|
|
|
|
# by this. Once CMake sees the bundle, it indiscrimately uses Doxywizard
|
|
|
|
# as the executable to use. The only work-around I have found is to disable
|
|
|
|
# the app-bundle feature for only this command.
|
|
|
|
# Save the old setting
|
|
|
|
SET(TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE})
|
|
|
|
# Disable the App-bundle detection feature
|
|
|
|
SET(CMAKE_FIND_APPBUNDLE "NEVER")
|
2006-12-04 19:52:46 +03:00
|
|
|
# For backwards compatibility support
|
|
|
|
# DOXYGEN_FIND_QUIETLY, but it should have been
|
|
|
|
# Doxygen_FIND_QUIETLY.
|
|
|
|
IF(DOXYGEN_FIND_QUIETLY)
|
|
|
|
SET(Doxygen_FIND_QUIETLY)
|
|
|
|
ENDIF(DOXYGEN_FIND_QUIETLY)
|
|
|
|
|
2006-10-04 19:04:26 +04:00
|
|
|
IF (NOT DOXYGEN_FIND_QUIETLY)
|
|
|
|
MESSAGE(STATUS "Looking for doxygen...")
|
|
|
|
ENDIF (NOT DOXYGEN_FIND_QUIETLY)
|
|
|
|
|
|
|
|
FIND_PROGRAM(DOXYGEN_EXECUTABLE
|
|
|
|
NAMES doxygen
|
|
|
|
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\doxygen_is1;Inno Setup: App Path]/bin"
|
2005-07-13 17:08:47 +04:00
|
|
|
/Applications/Doxygen.app/Contents/Resources
|
|
|
|
/Applications/Doxygen.app/Contents/MacOS
|
2006-10-04 19:04:26 +04:00
|
|
|
DOC "Doxygen documentation generation tool (http://www.doxygen.org)"
|
2001-10-24 01:06:19 +04:00
|
|
|
)
|
2001-10-24 01:47:32 +04:00
|
|
|
|
2006-10-04 19:04:26 +04:00
|
|
|
IF (DOXYGEN_EXECUTABLE)
|
|
|
|
SET (DOXYGEN_FOUND "YES")
|
|
|
|
IF (NOT DOXYGEN_FIND_QUIETLY)
|
|
|
|
MESSAGE(STATUS "Looking for doxygen... - found ${DOXYGEN_EXECUTABLE}")
|
|
|
|
ENDIF (NOT DOXYGEN_FIND_QUIETLY)
|
|
|
|
ELSE (DOXYGEN_EXECUTABLE)
|
|
|
|
IF (NOT DOXYGEN_FIND_QUIETLY)
|
|
|
|
IF (DOXYGEN_FIND_REQUIRED)
|
|
|
|
MESSAGE(FATAL_ERROR "Looking for doxygen... - NOT found")
|
|
|
|
ELSE (DOXYGEN_FIND_REQUIRED)
|
|
|
|
MESSAGE(STATUS "Looking for doxygen... - NOT found")
|
|
|
|
ENDIF (DOXYGEN_FIND_REQUIRED)
|
|
|
|
ENDIF (NOT DOXYGEN_FIND_QUIETLY)
|
|
|
|
ENDIF (DOXYGEN_EXECUTABLE)
|
|
|
|
|
2005-07-13 17:08:47 +04:00
|
|
|
# In the older versions of OS X Doxygen, dot was included with the
|
|
|
|
# Doxygen bundle. But the new versions place make you download Graphviz.app
|
|
|
|
# which contains dot in its bundle.
|
2006-10-04 19:04:26 +04:00
|
|
|
IF (NOT DOXYGEN_FIND_QUIETLY)
|
|
|
|
MESSAGE(STATUS "Looking for dot tool...")
|
|
|
|
ENDIF (NOT DOXYGEN_FIND_QUIETLY)
|
|
|
|
|
|
|
|
FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE
|
|
|
|
NAMES dot
|
|
|
|
PATHS "$ENV{ProgramFiles}/ATT/Graphviz/bin"
|
2001-10-24 01:47:32 +04:00
|
|
|
"C:/Program Files/ATT/Graphviz/bin"
|
2004-06-09 01:26:48 +04:00
|
|
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\ATT\\Graphviz;InstallPath]/bin
|
2005-07-13 17:08:47 +04:00
|
|
|
/Applications/Graphviz.app/Contents/MacOS
|
|
|
|
/Applications/Doxygen.app/Contents/Resources
|
|
|
|
/Applications/Doxygen.app/Contents/MacOS
|
2006-10-24 18:03:58 +04:00
|
|
|
DOC "Graphviz Dot tool for using Doxygen"
|
2005-07-13 17:08:47 +04:00
|
|
|
)
|
|
|
|
|
2006-10-04 19:04:26 +04:00
|
|
|
IF (NOT DOXYGEN_FIND_QUIETLY)
|
|
|
|
IF (DOXYGEN_DOT_EXECUTABLE)
|
|
|
|
MESSAGE(STATUS "Looking for dot tool... - found ${DOXYGEN_DOT_EXECUTABLE}")
|
2006-10-24 18:03:58 +04:00
|
|
|
# The Doxyfile wants the path to Dot, not the entire path and executable
|
|
|
|
GET_FILENAME_COMPONENT(DOXYGEN_DOT_PATH "${DOXYGEN_DOT_EXECUTABLE}" PATH CACHE)
|
2006-10-04 19:04:26 +04:00
|
|
|
ELSE (DOXYGEN_DOT_EXECUTABLE)
|
|
|
|
MESSAGE(STATUS "Looking for dot tool... - NOT found")
|
|
|
|
ENDIF (DOXYGEN_DOT_EXECUTABLE)
|
|
|
|
ENDIF (NOT DOXYGEN_FIND_QUIETLY)
|
|
|
|
|
|
|
|
|
2006-10-16 18:47:18 +04:00
|
|
|
# Restore the old app-bundle setting setting
|
|
|
|
SET(CMAKE_FIND_APPBUNDLE ${TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE})
|
|
|
|
|
2006-10-23 22:51:56 +04:00
|
|
|
# Backwards compatibility for CMake4.3 and less
|
|
|
|
SET (DOXYGEN ${DOXYGEN_EXECUTABLE} )
|
|
|
|
SET (DOT ${DOXYGEN_DOT_EXECUTABLE} )
|
|
|
|
|
2001-12-04 18:55:17 +03:00
|
|
|
MARK_AS_ADVANCED(
|
2006-10-23 22:51:56 +04:00
|
|
|
DOXYGEN_FOUND
|
|
|
|
DOXYGEN_EXECUTABLE
|
|
|
|
DOXYGEN_DOT_FOUND
|
|
|
|
DOXYGEN_DOT_EXECUTABLE
|
|
|
|
DOXYGEN_DOT_PATH
|
2006-10-04 19:04:26 +04:00
|
|
|
)
|