cmake/Modules/FindDoxygen.cmake
author Tero Marttila <terom@fixme.fi>
Thu, 15 Jan 2009 21:33:54 +0200
changeset 396 e1a24791d192
parent 376 2fd7fd2ee1a1
permissions -rw-r--r--
build scripts autodetect project version using 91d96387b359+ tip, and version is included in window title
374
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
     1
#
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
     2
# This module looks for Doxygen executable 
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
     3
# and the Graphviz dot executable 
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
     4
# which could be used to generate html 
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
     5
# and graphical documentaton from source code. 
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
     6
# 
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
     7
# It will set the following variables:
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
     8
#
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
     9
#  DOXYGEN_FOUND
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    10
#  DOXYGEN_EXECUTABLE
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    11
#
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    12
#  DOXYGEN_DOT_FOUND
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    13
#  DOXYGEN_DOT_EXECUTABLE
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    14
#  DOXYGEN_DOT_EXECUTABLE_PATH
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    15
#
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    16
# deprecated variables:
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    17
#  DOXYGEN
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    18
#  DOT
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    19
#
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    20
# see:
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    21
#  www.doxygen.org
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    22
#  www.research.att.com/sw/tools/graphviz/
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    23
#
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    24
# adapted from:
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    25
#  www.mip.informatik.uni-kiel.de/~jw/cmake/CMakeModules/FindDoxygen.cmake
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    26
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    27
FIND_PROGRAM (DOXYGEN_EXECUTABLE
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    28
    NAMES doxygen
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    29
    DOC "Path to doxygen binary"
396
e1a24791d192 build scripts autodetect project version using 91d96387b359+ tip, and version is included in window title
Tero Marttila <terom@fixme.fi>
parents: 376
diff changeset
    30
    PATHS $ENV{DOXYGEN_HOME}
374
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    31
)
396
e1a24791d192 build scripts autodetect project version using 91d96387b359+ tip, and version is included in window title
Tero Marttila <terom@fixme.fi>
parents: 376
diff changeset
    32
#MESSAGE(STATUS "DBG DOXYGEN_EXECUTABLE=${DOXYGEN_EXECUTABLE}")
374
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    33
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    34
FIND_PROGRAM (DOXYGEN_DOT_EXECUTABLE
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    35
    NAMES dot
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    36
    DOC "Path to dot binary from Graphiz (for doxygen)"
396
e1a24791d192 build scripts autodetect project version using 91d96387b359+ tip, and version is included in window title
Tero Marttila <terom@fixme.fi>
parents: 376
diff changeset
    37
    PATHS $ENV{DOT_HOME}
374
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    38
)
396
e1a24791d192 build scripts autodetect project version using 91d96387b359+ tip, and version is included in window title
Tero Marttila <terom@fixme.fi>
parents: 376
diff changeset
    39
#MESSAGE(STATUS "DBG DOXYGEN_DOT_EXECUTABLE=${DOXYGEN_DOT_EXECUTABLE}")
374
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    40
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    41
IF (DOXYGEN_EXECUTABLE)
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    42
    SET (DOXYGEN_FOUND TRUE)
376
2fd7fd2ee1a1 tweak mkcmake.sh, remove mkdoxyconf.sh, tweak MESSAGE output
terom
parents: 374
diff changeset
    43
2fd7fd2ee1a1 tweak mkcmake.sh, remove mkdoxyconf.sh, tweak MESSAGE output
terom
parents: 374
diff changeset
    44
    MESSAGE (STATUS "Found Doxygen at ${DOXYGEN_EXECUTABLE}")
374
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    45
ENDIF (DOXYGEN_EXECUTABLE)
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    46
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    47
IF (DOXYGEN_DOT_EXECUTABLE)
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    48
    SET (DOXYGEN_DOT_FOUND TRUE)  
376
2fd7fd2ee1a1 tweak mkcmake.sh, remove mkdoxyconf.sh, tweak MESSAGE output
terom
parents: 374
diff changeset
    49
    
2fd7fd2ee1a1 tweak mkcmake.sh, remove mkdoxyconf.sh, tweak MESSAGE output
terom
parents: 374
diff changeset
    50
    MESSAGE (STATUS "Found Dot at ${DOXYGEN_DOT_EXECUTABLE}")
374
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    51
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    52
    # the directory of dot is required in doxygen.config: DOT_PATH
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    53
    GET_FILENAME_COMPONENT (DOXYGEN_DOT_EXECUTABLE_PATH ${DOXYGEN_DOT_EXECUTABLE} PATH)
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    54
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    55
ENDIF (DOXYGEN_DOT_EXECUTABLE)
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    56
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    57
# hide
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    58
MARK_AS_ADVANCED (
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    59
    DOXYGEN_EXECUTABLE
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    60
    DOXYGEN_DOT_EXECUTABLE
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    61
    DPXYGEN_DOT_EXECUTABLE_DIR
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    62
    DOXYGEN
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    63
    DOT
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    64
)
1862c5f2cfc3 integrate doxygen into our cmake build system
terom
parents:
diff changeset
    65