]> SALOME platform Git repositories - tools/documentation.git/commitdiff
Salome HOME
Synchronize adm files V7_8_0a1 V8_0_0a2
authorMaintenance team (INV) <mnt@opencascade.com>
Wed, 13 Jan 2016 18:08:52 +0000 (21:08 +0300)
committerMaintenance team (INV) <mnt@opencascade.com>
Wed, 13 Jan 2016 18:08:52 +0000 (21:08 +0300)
CMakeModules/FindGraphviz.cmake

index af89f0cf3e1f6422c9851770e3036dfd37aad4df..35aada43904dbc1ecfb1953cc12faf6d23d9b97a 100644 (file)
@@ -35,6 +35,14 @@ FIND_PROGRAM(GRAPHVIZ_EXECUTABLE dot)
 FIND_PATH(GRAPHVIZ_INCLUDE_DIR NAMES graphviz/cgraph.h)
 SET(GRAPHVIZ_INCLUDE_DIRS ${GRAPHVIZ_INCLUDE_DIR} ${GRAPHVIZ_INCLUDE_DIR}/graphviz)
 
+IF(GRAPHVIZ_EXECUTABLE)
+  IF(NOT CMAKE_PREFIX_PATH) # Case where dot is in the path and -DGRAPHVIZ_ROOT_DIR not defined.
+    GET_FILENAME_COMPONENT(GRAPHVIZ_EXECUTABLE_DIR ${GRAPHVIZ_EXECUTABLE} PATH)
+    GET_FILENAME_COMPONENT(GRAPHVIZ_EXECUTABLE_DIR ${GRAPHVIZ_EXECUTABLE_DIR} PATH)
+    SET(CMAKE_PREFIX_PATH "${GRAPHVIZ_EXECUTABLE_DIR}")
+  ENDIF(NOT CMAKE_PREFIX_PATH)
+ENDIF(GRAPHVIZ_EXECUTABLE)
+
 FIND_LIBRARY(GRAPHVIZ_cdt_LIBRARY      NAMES cdt PATH_SUFFIXES bin)
 FIND_LIBRARY(GRAPHVIZ_graph_LIBRARY    NAMES cgraph PATH_SUFFIXES bin)
 FIND_LIBRARY(GRAPHVIZ_gvc_LIBRARY      NAMES gvc PATH_SUFFIXES bin)