Salome HOME
Detect include directory and libraries.
[modules/yacs.git] / salome_adm / cmake_files / FindGraphviz.cmake
1 # - Graphviz detection
2 #
3 # Output variables: GRAPHVIZ_EXECUTABLE   - where is executable 'dot' takes place.
4 #                   GRAPHVIZ_INCLUDE_DIRS - where to find headers.
5 #                   GRAPHVIZ_LIBRARIES    - where to get libraries.
6 #                   GRAPHVIZ_FOUND        - True if Graphiz was found.
7 #
8 ###########################################################################
9 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
10 #
11 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
12 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
13 #
14 # This library is free software; you can redistribute it and/or
15 # modify it under the terms of the GNU Lesser General Public
16 # License as published by the Free Software Foundation; either
17 # version 2.1 of the License.
18 #
19 # This library is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22 # Lesser General Public License for more details.
23 #
24 # You should have received a copy of the GNU Lesser General Public
25 # License along with this library; if not, write to the Free Software
26 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
27 #
28 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
29 #
30 ###########################################################################
31
32 FIND_PROGRAM(GRAPHVIZ_EXECUTABLE dot)
33
34 FIND_PATH(GRAPHVIZ_INCLUDE_DIR NAMES graphviz/graph.h)
35 SET(GRAPHVIZ_INCLUDE_DIR ${GRAPHVIZ_INCLUDE_DIR}/graphviz)
36
37 FIND_LIBRARY(GRAPHVIZ_graph_LIBRARY NAMES graph)
38 SET(GRAPHVIZ_LIBRARIES ${GRAPHVIZ_graph_LIBRARY})
39
40 # Handle the standard arguments of the find_package() command:
41 INCLUDE(FindPackageHandleStandardArgs)
42 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Graphviz REQUIRED_VARS 
43                                            GRAPHVIZ_EXECUTABLE 
44                                            GRAPHVIZ_LIBRARIES 
45                                            GRAPHVIZ_INCLUDE_DIR)