From: Dimitri John Ledkov Date: Tue, 14 Sep 2021 08:00:34 +0000 (+0100) Subject: Fix harfbuzz detection X-Git-Tag: archive/raspbian/1.1+git20181118-5+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0dfc6556ffa09ea9664d1ebaeec4707abbc35b71;p=performous.git Fix harfbuzz detection Gbp-Pq: Name add-harfbuzz.patch --- diff --git a/cmake/Modules/FindHarfbuzz.cmake b/cmake/Modules/FindHarfbuzz.cmake new file mode 100644 index 0000000..39551fe --- /dev/null +++ b/cmake/Modules/FindHarfbuzz.cmake @@ -0,0 +1,27 @@ +# - Try to find Harfbuzz +# Once done, this will define +# +# Harfbuzz_FOUND - system has Harfbuzz +# Harfbuzz_INCLUDE_DIRS - the Harfbuzz include directories +# Harfbuzz_LIBRARIES - link these to use Harfbuzz + +include(LibFindMacros) + +# Use pkg-config to get hints about paths +libfind_pkg_check_modules(Harfbuzz_PKGCONF harfbuzz) + +# Include dir +find_path(Harfbuzz_INCLUDE_DIR + NAMES harfbuzz/hb.h + HINTS ${Harfbuzz_PKGCONF_INCLUDE_DIRS} + PATH_SUFFIXES harfbuzz +) + +# Finally the library itself +find_library(Harfbuzz_LIBRARY + NAMES harfbuzz + HINTS ${Harfbuzz_PKGCONF_LIBRARY_DIRS} +) + +libfind_process(Harfbuzz) + diff --git a/cmake/Modules/FindPango.cmake b/cmake/Modules/FindPango.cmake index bdddb9e..dc3ebd3 100644 --- a/cmake/Modules/FindPango.cmake +++ b/cmake/Modules/FindPango.cmake @@ -8,6 +8,7 @@ include(LibFindMacros) # Dependencies +libfind_package(Pango Harfbuzz) libfind_package(Pango Freetype) libfind_package(Pango Glib) libfind_package(Pango GObject) diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt index de33f2c..9cea871 100644 --- a/game/CMakeLists.txt +++ b/game/CMakeLists.txt @@ -86,6 +86,7 @@ foreach(lib ${OUR_LIBS} SDL2 PangoCairo LibRSVG LibXML++ AVFormat SWResample SWS find_package(${lib} REQUIRED) message(STATUS "${lib} includes: ${${lib}_INCLUDE_DIRS}") include_directories(${${lib}_INCLUDE_DIRS}) + include_directories(${${lib}_PKGCONF_INCLUDE_DIRS}) list(APPEND LIBS ${${lib}_LIBRARIES}) add_definitions(${${lib}_DEFINITIONS}) endforeach(lib)