summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-29 13:58:39 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-05-29 13:58:39 (GMT)
commit0fbec3d3c2a55d40d2671990ffd6baa53dce24d1 (patch)
tree21e0718ba29344c0b496cb674175ae47b1806932 /Modules
parent1468e986e1874f7c011e74885e4df2fbab65b396 (diff)
parentf49b6a33f6c4920bf9f18735f66d91c51c2f1581 (diff)
downloadCMake-0fbec3d3c2a55d40d2671990ffd6baa53dce24d1.zip
CMake-0fbec3d3c2a55d40d2671990ffd6baa53dce24d1.tar.gz
CMake-0fbec3d3c2a55d40d2671990ffd6baa53dce24d1.tar.bz2
Merge topic 'FindDoxygen-windows-dot'
f49b6a33 FindDoxygen: Deprecate DOXYGEN_DOT_PATH 7980eab8 FindDoxygen: Improve search for Graphviz "dot" on Windows
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindDoxygen.cmake24
1 files changed, 19 insertions, 5 deletions
diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake
index a456d9c..d34941a 100644
--- a/Modules/FindDoxygen.cmake
+++ b/Modules/FindDoxygen.cmake
@@ -30,7 +30,16 @@
#
# DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen.
# DOXYGEN_DOT_FOUND = Was Dot found or not?
-# DOXYGEN_DOT_PATH = The path to dot not including the executable
+#
+# For compatibility with older versions of CMake, the now-deprecated
+# variable ``DOXYGEN_DOT_PATH`` is set to the path to the directory
+# containing ``dot`` as reported in ``DOXYGEN_DOT_EXECUTABLE``.
+# The path may have forward slashes even on Windows and is not
+# suitable for direct substitution into a ``Doxyfile.in`` template.
+# If you need this value, use :command:`get_filename_component`
+# to compute it from ``DOXYGEN_DOT_EXECUTABLE`` directly, and
+# perhaps the :command:`file(TO_NATIVE_PATH)` command to prepare
+# the path for a Doxygen configuration file.
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
@@ -101,12 +110,18 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Doxygen REQUIRED_VARS DOXYGEN_EXECUTABLE VERSI
# Find Dot...
#
+set(_x86 "(x86)")
+file(GLOB _Doxygen_GRAPHVIZ_BIN_DIRS
+ "$ENV{ProgramFiles}/Graphviz*/bin"
+ "$ENV{ProgramFiles${_x86}}/Graphviz*/bin"
+ )
+unset(_x86)
+
if(NOT DOXYGEN_SKIP_DOT)
find_program(DOXYGEN_DOT_EXECUTABLE
NAMES dot
PATHS
- "$ENV{ProgramFiles}/Graphviz 2.21/bin"
- "C:/Program Files/Graphviz 2.21/bin"
+ ${_Doxygen_GRAPHVIZ_BIN_DIRS}
"$ENV{ProgramFiles}/ATT/Graphviz/bin"
"C:/Program Files/ATT/Graphviz/bin"
[HKEY_LOCAL_MACHINE\\SOFTWARE\\ATT\\Graphviz;InstallPath]/bin
@@ -119,7 +134,7 @@ if(NOT DOXYGEN_SKIP_DOT)
if(DOXYGEN_DOT_EXECUTABLE)
set(DOXYGEN_DOT_FOUND TRUE)
# The Doxyfile wants the path to Dot, not the entire path and executable
- get_filename_component(DOXYGEN_DOT_PATH "${DOXYGEN_DOT_EXECUTABLE}" PATH CACHE)
+ get_filename_component(DOXYGEN_DOT_PATH "${DOXYGEN_DOT_EXECUTABLE}" PATH)
endif()
endif()
@@ -153,5 +168,4 @@ set (DOT ${DOXYGEN_DOT_EXECUTABLE} )
mark_as_advanced(
DOXYGEN_EXECUTABLE
DOXYGEN_DOT_EXECUTABLE
- DOXYGEN_DOT_PATH
)