TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags
[wireshark-sm.git] / cmake / modules / FindDOXYGEN.cmake
blob52e129a0b4bff8c16b2f9e9813cf29f358201d57
2 # - Find Doxygen
3 # This module looks for a native (non-Cygwin) Doxygen.
6 find_program( DOXYGEN_EXECUTABLE
7   NAMES
8     doxygen
9   PATHS
10     /bin
11     /usr/bin
12     /usr/local/bin
13     /sbin
14     $ENV{ProgramFiles}/doxygen/bin
17 # We set various paths in doxygen.cfg via configure_file(). These are
18 # native system paths which aren't compatible with Cygwin's Doxygen.
19 string(TOLOWER ${DOXYGEN_EXECUTABLE} _de_lower)
20 if(${_de_lower} MATCHES "cyg")
21         set(_ignore_reason "Cygwin Doxygen found at ${DOXYGEN_EXECUTABLE}. Ignoring.")
22         message(STATUS ${_ignore_reason})
23         set(DOXYGEN_EXECUTABLE DOXYGEN_EXECUTABLE-NOTFOUND CACHE FILEPATH ${_ignore_reason} FORCE)
24 endif()
26 include( FindPackageHandleStandardArgs )
27 find_package_handle_standard_args( DOXYGEN DEFAULT_MSG DOXYGEN_EXECUTABLE )
29 mark_as_advanced( DOXYGEN_EXECUTABLE )
31 macro( DOXYGEN2HTML _output )
32         GET_FILENAME_COMPONENT(_OUTDIR ${_output} PATH)
33         SET(_OUTDIR ${CMAKE_CURRENT_BINARY_DIR}/${_OUTDIR})
35         add_custom_command(
36                 OUTPUT
37                 COMMAND cmake
38                         -E make_directory ${_OUTDIR}
39                 COMMAND $(DOXYGEN_EXECUTABLE)
40                         doxygen.cfg
41                 COMMAND chmod
42                         -R og+rX ${_OUTDIR}
43                 DEPENDS
44                         doxygen.cfg
45         )
46 endmacro()