1 # - This module looks for Doxygen and the path to Graphviz's dot
2 # Doxygen is a documentation generation tool. Please see
3 # http://www.doxygen.org
5 # This module accepts the following optional variables:
7 # DOXYGEN_SKIP_DOT = If true this module will skip trying to find Dot
8 # (an optional component often used by Doxygen)
10 # This modules defines the following variables:
12 # DOXYGEN_EXECUTABLE = The path to the doxygen command.
13 # DOXYGEN_FOUND = Was Doxygen found or not?
15 # DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen.
16 # DOXYGEN_DOT_FOUND = Was Dot found or not?
17 # DOXYGEN_DOT_PATH = The path to dot not including the executable
21 # For backwards compatibility support
22 IF(Doxygen_FIND_QUIETLY)
23 SET(DOXYGEN_FIND_QUIETLY TRUE)
24 ENDIF(Doxygen_FIND_QUIETLY)
26 # ===== Rationale for OS X AppBundle mods below =====
27 # With the OS X GUI version, Doxygen likes to be installed to /Applications and
28 # it contains the doxygen executable in the bundle. In the versions I've
29 # seen, it is located in Resources, but in general, more often binaries are
32 # NOTE: The official Doxygen.app that is distributed for OS X uses non-standard
33 # conventions. Instead of the command-line "doxygen" tool being placed in
34 # Doxygen.app/Contents/MacOS, "Doxywizard" is placed there instead and
35 # "doxygen" is placed in Contents/Resources. This is most likely done
36 # so that something happens when people double-click on the Doxygen.app
37 # package. Unfortunately, CMake gets confused by this as when it sees the
38 # bundle it uses "Doxywizard" as the executable to use instead of
39 # "doxygen". Therefore to work-around this issue we temporarily disable
40 # the app-bundle feature, just for this CMake module:
42 # Save the old setting
43 SET(TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE})
44 # Disable the App-bundle detection feature
45 SET(CMAKE_FIND_APPBUNDLE "NEVER")
48 # In the older versions of OS X Doxygen, dot was included with the
49 # Doxygen bundle. But the new versions require you to download
50 # Graphviz.app which contains "dot" in it's bundle.
51 # ============== End OSX stuff ================
57 FIND_PROGRAM(DOXYGEN_EXECUTABLE
60 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\doxygen_is1;Inno Setup: App Path]/bin"
61 /Applications/Doxygen.app/Contents/Resources
62 /Applications/Doxygen.app/Contents/MacOS
63 DOC "Doxygen documentation generation tool (http://www.doxygen.org)"
66 include(FindPackageHandleStandardArgs)
67 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Doxygen DEFAULT_MSG DOXYGEN_EXECUTABLE)
73 IF(NOT DOXYGEN_SKIP_DOT)
74 FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE
77 "$ENV{ProgramFiles}/Graphviz 2.21/bin"
78 "C:/Program Files/Graphviz 2.21/bin"
79 "$ENV{ProgramFiles}/ATT/Graphviz/bin"
80 "C:/Program Files/ATT/Graphviz/bin"
81 [HKEY_LOCAL_MACHINE\\SOFTWARE\\ATT\\Graphviz;InstallPath]/bin
82 /Applications/Graphviz.app/Contents/MacOS
83 /Applications/Doxygen.app/Contents/Resources
84 /Applications/Doxygen.app/Contents/MacOS
85 DOC "Graphviz Dot tool for using Doxygen"
88 if(DOXYGEN_DOT_EXECUTABLE)
89 set(DOXYGEN_DOT_FOUND TRUE)
90 # The Doxyfile wants the path to Dot, not the entire path and executable
91 get_filename_component(DOXYGEN_DOT_PATH "${DOXYGEN_DOT_EXECUTABLE}" PATH CACHE)
94 endif(NOT DOXYGEN_SKIP_DOT)
97 # Backwards compatibility...
101 # Restore the old app-bundle setting setting
102 SET(CMAKE_FIND_APPBUNDLE ${TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE})
105 # Maintain the _FOUND variables as "YES" or "NO" for backwards compatibility
106 # (allows people to stuff them directly into Doxyfile with configure_file())
108 set(DOXYGEN_FOUND "YES")
110 set(DOXYGEN_FOUND "NO")
112 if(DOXYGEN_DOT_FOUND)
113 set(DOXYGEN_DOT_FOUND "YES")
115 set(DOXYGEN_DOT_FOUND "NO")
118 # For backwards compatibility support
119 SET (DOXYGEN ${DOXYGEN_EXECUTABLE} )
120 SET (DOT ${DOXYGEN_DOT_EXECUTABLE} )
124 DOXYGEN_DOT_EXECUTABLE