]> granicus.if.org Git - graphviz/commitdiff
Improve FindPangoCairo for linux
authorErwin Janssen <erwinjanssen@outlook.com>
Thu, 18 May 2017 10:12:14 +0000 (12:12 +0200)
committerErwin Janssen <erwinjanssen@outlook.com>
Wed, 24 May 2017 18:28:58 +0000 (20:28 +0200)
Add the location and suffixes of the header files, which were not yet
found by Cmake on Linux.

CMakeLists.txt
cmake/FindPangoCairo.cmake

index 7d2a7ae6fd39fb3b407aaa99000d90003efe4e8a..55a45646de8db4695df5bd419b147d8b8d3d706e 100644 (file)
@@ -71,7 +71,7 @@ if (WIN32)
     list(APPEND CMAKE_LIBRARY_PATH ${WINDOWS_DEPENDENCY_DIR}/lib)
     list(APPEND CMAKE_INCLUDE_PATH ${WINDOWS_DEPENDENCY_DIR}/include ${WINDOWS_DEPENDENCY_DIR}/bin)
 else()
-    list(APPEND CMAKE_INCLUDE_PATH /usr/lib /usr/local/lib)
+    list(APPEND CMAKE_INCLUDE_PATH /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu)
 endif()
 
 find_package(ANN)
index cf81e01b2bd793857257f8fed5c55be8a4e154a0..c21b80b3f1a1d9f2c3609455f10729212b7860c8 100644 (file)
@@ -1,4 +1,6 @@
-find_path(PANGOCAIRO_INCLUDE_DIR pango/pangocairo.h)
+find_path(PANGOCAIRO_INCLUDE_DIR pango/pangocairo.h PATH_SUFFIXES pango-1.0)
+find_path(GLIB_INCLUDE_DIR glib.h PATH_SUFFIXES glib-2.0)
+find_path(GLIBCONFIG_INCLUDE_DIR glibconfig.h PATH_SUFFIXES glib-2.0/include)
 
 find_library(GLIB_LIBRARY NAMES glib-2.0)
 find_library(GOBJECT_LIBRARY NAMES gobject-2.0)
@@ -16,6 +18,8 @@ find_file(PANGOWIN_RUNTIME_LIBRARY NAMES pangowin32-1.dll)
 include(FindPackageHandleStandardArgs)
 if (WIN32)
     find_package_handle_standard_args(PANGOCAIRO DEFAULT_MSG
+        GLIB_INCLUDE_DIR
+        GLIBCONFIG_INCLUDE_DIR
         PANGOCAIRO_INCLUDE_DIR
 
         GLIB_LIBRARY
@@ -33,6 +37,8 @@ if (WIN32)
     )
 else()
     find_package_handle_standard_args(PANGOCAIRO DEFAULT_MSG
+        GLIB_INCLUDE_DIR
+        GLIBCONFIG_INCLUDE_DIR
         PANGOCAIRO_INCLUDE_DIR
 
         GLIB_LIBRARY
@@ -43,6 +49,8 @@ else()
 endif()
 
 mark_as_advanced(
+    GLIB_INCLUDE_DIR
+    GLIBCONFIG_INCLUDE_DIR
     PANGOCAIRO_INCLUDE_DIR
 
     GLIB_LIBRARY
@@ -59,7 +67,11 @@ mark_as_advanced(
     PANGOWIN_RUNTIME_LIBRARY
 )
 
-set(PANGOCAIRO_INCLUDE_DIRS ${PANGOCAIRO_INCLUDE_DIR})
+set(PANGOCAIRO_INCLUDE_DIRS
+    ${GLIB_INCLUDE_DIR}
+    ${GLIBCONFIG_INCLUDE_DIR}
+    ${PANGOCAIRO_INCLUDE_DIR}
+)
 
 set(PANGOCAIRO_LIBRARIES
     ${GLIB_LIBRARY}