From 39d93237f889646a2b678d34e143343be822ce1c Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Thu, 18 May 2017 12:12:14 +0200 Subject: [PATCH] Improve FindPangoCairo for linux Add the location and suffixes of the header files, which were not yet found by Cmake on Linux. --- CMakeLists.txt | 2 +- cmake/FindPangoCairo.cmake | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d2a7ae6f..55a45646d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/FindPangoCairo.cmake b/cmake/FindPangoCairo.cmake index cf81e01b2..c21b80b3f 100644 --- a/cmake/FindPangoCairo.cmake +++ b/cmake/FindPangoCairo.cmake @@ -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} -- 2.40.0