Warning, /kdevelop/kdev-control-flow-graph/cmake/modules/FindGraphViz.cmake is written in an unsupported language. File is not indexed.

0001 ###########################################################################
0002 #   Copyright 2009 Sandro Andrade <sandroandrade@kde.org>                 #
0003 #                                                                         #
0004 #   This program is free software; you can redistribute it and/or modify  #
0005 #   it under the terms of the GNU Library General Public License as       #
0006 #   published by the Free Software Foundation; either version 2 of the    #
0007 #   License, or (at your option) any later version.                       #
0008 #                                                                         #
0009 #   This program is distributed in the hope that it will be useful,       #
0010 #   but WITHOUT ANY WARRANTY; without even the implied warranty of        #
0011 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         #
0012 #   GNU General Public License for more details.                          #
0013 #                                                                         #
0014 #   You should have received a copy of the GNU Library General Public     #
0015 #   License along with this program; if not, write to the                 #
0016 #   Free Software Foundation, Inc.,                                       #
0017 #   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         #
0018 ###########################################################################/
0019 
0020 if (NOT WIN32)
0021   find_package(PkgConfig)
0022   pkg_check_modules(graphviz ${REQUIRED} libgvc libcdt libcgraph libpathplan)
0023   if (GraphViz_FOUND)
0024     set (GraphViz_INCLUDE_DIRECTORIES ${GraphViz_INCLUDE_DIRS})
0025   endif (GraphViz_FOUND)
0026 endif (NOT WIN32)
0027     
0028 find_path(GraphViz_INCLUDE_DIRECTORIES
0029   NAMES gvc.h
0030   PATHS
0031   ${GraphViz_INCLUDE_DIRS}
0032   /usr/local/include/graphviz
0033   /usr/include/graphviz
0034 )
0035     
0036 find_library(GraphViz_GVC_LIBRARY
0037   NAMES gvc
0038   PATHS
0039   ${GraphViz_LIBRARY_DIRS}
0040 )
0041 
0042 find_library(GraphViz_CDT_LIBRARY
0043   NAMES cdt
0044   PATHS
0045   ${GraphViz_LIBRARY_DIRS}
0046 )
0047 
0048 find_library(GraphViz_GRAPH_LIBRARY
0049   NAMES cgraph
0050   PATHS
0051   ${GraphViz_LIBRARY_DIRS}
0052 )
0053 
0054 find_library(GraphViz_PATHPLAN_LIBRARY
0055   NAMES pathplan
0056   PATHS
0057   ${GraphViz_LIBRARY_DIRS}
0058 )
0059 
0060 if (GraphViz_INCLUDE_DIRECTORIES AND
0061     GraphViz_GVC_LIBRARY AND GraphViz_CDT_LIBRARY AND
0062     GraphViz_GRAPH_LIBRARY AND GraphViz_PATHPLAN_LIBRARY)
0063   set (GraphViz_FOUND 1)
0064   set (GraphViz_LIBRARIES
0065        "${GraphViz_GVC_LIBRARY};${GraphViz_GRAPH_LIBRARY};"
0066        "${GraphViz_CDT_LIBRARY};${GraphViz_PATHPLAN_LIBRARY}"
0067        CACHE FILEPATH "Libraries for graphviz")
0068 else (GraphViz_INCLUDE_DIRECTORIES AND
0069       GraphViz_GVC_LIBRARY AND GraphViz_CDT_LIBRARY AND
0070       GraphViz_GRAPH_LIBRARY AND GraphViz_PATHPLAN_LIBRARY)
0071   set (GraphViz_FOUND 0)
0072   if (GraphViz_FIND_REQUIRED)
0073     message (FATAL_ERROR "GraphViz not installed !")
0074   endif (GraphViz_FIND_REQUIRED)
0075 endif (GraphViz_INCLUDE_DIRECTORIES AND
0076 GraphViz_GVC_LIBRARY AND GraphViz_CDT_LIBRARY AND
0077 GraphViz_GRAPH_LIBRARY AND GraphViz_PATHPLAN_LIBRARY)