cmake/Modules/FindDoxygen.cmake
changeset 62 07c14d83c698
equal deleted inserted replaced
61:9f7ecf7bf699 62:07c14d83c698
       
     1 #
       
     2 # This module looks for Doxygen executable 
       
     3 # and the Graphviz dot executable 
       
     4 # which could be used to generate html 
       
     5 # and graphical documentaton from source code. 
       
     6 # 
       
     7 # It will set the following variables:
       
     8 #
       
     9 #  DOXYGEN_FOUND
       
    10 #  DOXYGEN_EXECUTABLE
       
    11 #
       
    12 #  DOXYGEN_DOT_FOUND
       
    13 #  DOXYGEN_DOT_EXECUTABLE
       
    14 #  DOXYGEN_DOT_EXECUTABLE_PATH
       
    15 #
       
    16 # deprecated variables:
       
    17 #  DOXYGEN
       
    18 #  DOT
       
    19 #
       
    20 # see:
       
    21 #  www.doxygen.org
       
    22 #  www.research.att.com/sw/tools/graphviz/
       
    23 #
       
    24 # adapted from:
       
    25 #  www.mip.informatik.uni-kiel.de/~jw/cmake/CMakeModules/FindDoxygen.cmake
       
    26 
       
    27 FIND_PROGRAM (DOXYGEN_EXECUTABLE
       
    28     NAMES doxygen
       
    29     DOC "Path to doxygen binary"
       
    30     PATHS $ENV{DOXYGEN_HOME}
       
    31 )
       
    32 #MESSAGE(STATUS "DBG DOXYGEN_EXECUTABLE=${DOXYGEN_EXECUTABLE}")
       
    33 
       
    34 FIND_PROGRAM (DOXYGEN_DOT_EXECUTABLE
       
    35     NAMES dot
       
    36     DOC "Path to dot binary from Graphiz (for doxygen)"
       
    37     PATHS $ENV{DOT_HOME}
       
    38 )
       
    39 #MESSAGE(STATUS "DBG DOXYGEN_DOT_EXECUTABLE=${DOXYGEN_DOT_EXECUTABLE}")
       
    40 
       
    41 IF (DOXYGEN_EXECUTABLE)
       
    42     SET (DOXYGEN_FOUND TRUE)
       
    43 
       
    44     MESSAGE (STATUS "Found Doxygen at ${DOXYGEN_EXECUTABLE}")
       
    45 ENDIF (DOXYGEN_EXECUTABLE)
       
    46 
       
    47 IF (DOXYGEN_DOT_EXECUTABLE)
       
    48     SET (DOXYGEN_DOT_FOUND TRUE)  
       
    49     
       
    50     MESSAGE (STATUS "Found Dot at ${DOXYGEN_DOT_EXECUTABLE}")
       
    51 
       
    52     # the directory of dot is required in doxygen.config: DOT_PATH
       
    53     GET_FILENAME_COMPONENT (DOXYGEN_DOT_EXECUTABLE_PATH ${DOXYGEN_DOT_EXECUTABLE} PATH)
       
    54 
       
    55 ENDIF (DOXYGEN_DOT_EXECUTABLE)
       
    56 
       
    57 # hide
       
    58 MARK_AS_ADVANCED (
       
    59     DOXYGEN_EXECUTABLE
       
    60     DOXYGEN_DOT_EXECUTABLE
       
    61     DPXYGEN_DOT_EXECUTABLE_DIR
       
    62     DOXYGEN
       
    63     DOT
       
    64 )
       
    65