Skip to content

Instantly share code, notes, and snippets.

@arajkumar
Forked from qrwteyrutiyoup/gist:6629007
Created October 23, 2013 18:37
Show Gist options
  • Save arajkumar/7124117 to your computer and use it in GitHub Desktop.
Save arajkumar/7124117 to your computer and use it in GitHub Desktop.
diff --git a/Source/cmake/FindHarfBuzz.cmake b/Source/cmake/FindHarfBuzz.cmake
index f8ca605..6e77478 100644
--- a/Source/cmake/FindHarfBuzz.cmake
+++ b/Source/cmake/FindHarfBuzz.cmake
@@ -42,5 +42,14 @@ find_library(HARFBUZZ_LIBRARIES NAMES harfbuzz
HINTS ${PC_HARFBUZZ_LIBRARY_DIRS} ${PC_HARFBUZZ_LIBDIR}
)
+# HarfBuzz 0.9.18 split ICU support into a separate library harfbuzz-icu.
+if ("PC_HARFBUZZ_VERSION" VERSION_GREATER "0.9.17")
+ pkg_check_modules(PC_HARFBUZZ_ICU harfbuzz-icu>=0.9.18 REQUIRED)
+ find_library(HARFBUZZ_ICU_LIBRARIES NAMES harfbuzz-icu
+ HINTS ${PC_HARFBUZZ_ICU_LIBRARY_DIRS} ${PC_HARFBUZZ_ICU_LIBDIR}
+ )
+ list(APPEND HARFBUZZ_LIBRARIES "${HARFBUZZ_ICU_LIBRARIES}")
+endif ()
+
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HarfBuzz DEFAULT_MSG HARFBUZZ_INCLUDE_DIRS HARFBUZZ_LIBRARIES)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment