summaryrefslogtreecommitdiff
path: root/graphics/kgraphviewer/files/patch-cmake_FindGraphviz.cmake
blob: 054b0112b971ce576f5b872edb7f4768e25f76b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Don't name-collide the variables from pkg-config with the ones this
CMake find-module is supposed to set. Follow the hints that pkg-config
provides to find the actual libraries.
--- cmake/FindGraphviz.cmake.orig	2017-09-27 13:15:56 UTC
+++ cmake/FindGraphviz.cmake
@@ -29,10 +29,8 @@
 if ( NOT WIN32 )
   
   find_package(PkgConfig)
-  pkg_check_modules( graphviz ${REQUIRED} libgvc libcdt libcgraph libpathplan )
-  if ( graphviz_FOUND )
-    set ( graphviz_INCLUDE_DIRECTORIES ${graphviz_INCLUDE_DIRS} )
-  endif ( graphviz_FOUND )
+  # Don't name-collide with the find_library() calls below, use pc_ prefix
+  pkg_check_modules( pc_graphviz ${REQUIRED} libgvc libcdt libcgraph libpathplan )
     
 endif ( NOT WIN32 )
     
@@ -43,6 +41,7 @@ find_path( graphviz_INCLUDE_DIRECTORIES
     /usr/local/include
     /usr/include
     PATH_SUFFIXES graphviz
+    HINTS ${pc_graphviz_INCLUDE_DIRECTORIES}
     )
     
 find_library( graphviz_GVC_LIBRARY
@@ -53,6 +52,7 @@ find_library( graphviz_GVC_LIBRARY
     /usr/lib64
     /usr/local/lib
     /usr/lib
+    HINTS ${pc_graphviz_LIBRARY_DIRS}
     )
 
 find_library( graphviz_CDT_LIBRARY
@@ -63,6 +63,7 @@ find_library( graphviz_CDT_LIBRARY
     /usr/lib64
     /usr/local/lib
     /usr/lib
+    HINTS ${pc_graphviz_LIBRARY_DIRS}
     )
 
 find_library( graphviz_GRAPH_LIBRARY
@@ -73,6 +74,7 @@ find_library( graphviz_GRAPH_LIBRARY
     /usr/lib64
     /usr/local/lib
     /usr/lib
+    HINTS ${pc_graphviz_LIBRARY_DIRS}
     )
 
 find_library( graphviz_PATHPLAN_LIBRARY
@@ -83,6 +85,7 @@ find_library( graphviz_PATHPLAN_LIBRARY
     /usr/lib64
     /usr/local/lib
     /usr/lib
+    HINTS ${pc_graphviz_LIBRARY_DIRS}
     )
 
 if ( graphviz_INCLUDE_DIRECTORIES AND