1 # - This module looks for Doxygen and the path to Graphviz's dot
2 # Doxygen is a documentation generation tool see http://www.doxygen.org
3 # With the OS X GUI version, it likes to be installed to /Applications and
4 # it contains the doxygen executable in the bundle. In the versions I've
5 # seen, it is located in Resources, but in general, more often binaries are
6 # located in MacOS. This code sets the following variables:
7 # DOXYGEN_EXECUTABLE = The path to the doxygen command.
8 # DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen.
9 # DOXYGEN_DOT_PATH = The path to dot not including the executable
10 # DOXYGEN = same as DOXYGEN_EXECUTABLE for backwards compatibility
11 # DOT = same as DOXYGEN_DOT_EXECUTABLE for backwards compatibility
13 # The official Doxygen.app that is distributed for OS X uses non-standard
14 # conventions. Instead of the command-line "doxygen" tool being placed in
15 # Doxygen.app/Contents/MacOS, "Doxywizard" is placed there instead and
16 # "doxygen" is actually placed in Contents/Resources. This is most likely
17 # to accomodate people who double-click on the Doxygen.app package and expect
18 # to see something happen. However, the CMake backend gets horribly confused
19 # by this. Once CMake sees the bundle, it indiscrimately uses Doxywizard
20 # as the executable to use. The only work-around I have found is to disable
21 # the app-bundle feature for only this command.
22 # Save the old setting
23 SET(TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE})
24 # Disable the App-bundle detection feature
25 SET(CMAKE_FIND_APPBUNDLE "NEVER")
26 # For backwards compatibility support
27 # DOXYGEN_FIND_QUIETLY, but it should have been
28 # Doxygen_FIND_QUIETLY.
29 IF(Doxygen_FIND_QUIETLY)
30 SET(DOXYGEN_FIND_QUIETLY TRUE)
31 ENDIF(Doxygen_FIND_QUIETLY)
33 IF (NOT DOXYGEN_FIND_QUIETLY)
34 MESSAGE(STATUS "Looking for doxygen...")
35 ENDIF (NOT DOXYGEN_FIND_QUIETLY)
37 FIND_PROGRAM(DOXYGEN_EXECUTABLE
39 PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\doxygen_is1;Inno Setup: App Path]/bin"
40 /Applications/Doxygen.app/Contents/Resources
41 /Applications/Doxygen.app/Contents/MacOS
42 DOC "Doxygen documentation generation tool (http://www.doxygen.org)"
45 IF (DOXYGEN_EXECUTABLE)
46 SET (DOXYGEN_FOUND "YES")
47 IF (NOT DOXYGEN_FIND_QUIETLY)
48 MESSAGE(STATUS "Looking for doxygen... - found ${DOXYGEN_EXECUTABLE}")
49 ENDIF (NOT DOXYGEN_FIND_QUIETLY)
50 ELSE (DOXYGEN_EXECUTABLE)
51 IF (NOT DOXYGEN_FIND_QUIETLY)
52 IF (DOXYGEN_FIND_REQUIRED)
53 MESSAGE(FATAL_ERROR "Looking for doxygen... - NOT found")
54 ELSE (DOXYGEN_FIND_REQUIRED)
55 MESSAGE(STATUS "Looking for doxygen... - NOT found")
56 ENDIF (DOXYGEN_FIND_REQUIRED)
57 ENDIF (NOT DOXYGEN_FIND_QUIETLY)
58 ENDIF (DOXYGEN_EXECUTABLE)
60 # In the older versions of OS X Doxygen, dot was included with the
61 # Doxygen bundle. But the new versions place make you download Graphviz.app
62 # which contains dot in its bundle.
63 IF (NOT DOXYGEN_FIND_QUIETLY)
64 MESSAGE(STATUS "Looking for dot tool...")
65 ENDIF (NOT DOXYGEN_FIND_QUIETLY)
67 FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE
69 PATHS "$ENV{ProgramFiles}/ATT/Graphviz/bin"
70 "C:/Program Files/ATT/Graphviz/bin"
71 [HKEY_LOCAL_MACHINE\\SOFTWARE\\ATT\\Graphviz;InstallPath]/bin
72 /Applications/Graphviz.app/Contents/MacOS
73 /Applications/Doxygen.app/Contents/Resources
74 /Applications/Doxygen.app/Contents/MacOS
75 DOC "Graphviz Dot tool for using Doxygen"
78 IF (NOT DOXYGEN_FIND_QUIETLY)
79 IF (DOXYGEN_DOT_EXECUTABLE)
80 MESSAGE(STATUS "Looking for dot tool... - found ${DOXYGEN_DOT_EXECUTABLE}")
81 # The Doxyfile wants the path to Dot, not the entire path and executable
82 GET_FILENAME_COMPONENT(DOXYGEN_DOT_PATH "${DOXYGEN_DOT_EXECUTABLE}" PATH CACHE)
83 ELSE (DOXYGEN_DOT_EXECUTABLE)
84 MESSAGE(STATUS "Looking for dot tool... - NOT found")
85 ENDIF (DOXYGEN_DOT_EXECUTABLE)
86 ENDIF (NOT DOXYGEN_FIND_QUIETLY)
89 # Restore the old app-bundle setting setting
90 SET(CMAKE_FIND_APPBUNDLE ${TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE})
92 # Backwards compatibility for CMake4.3 and less
93 SET (DOXYGEN ${DOXYGEN_EXECUTABLE} )
94 SET (DOT ${DOXYGEN_DOT_EXECUTABLE} )
100 DOXYGEN_DOT_EXECUTABLE