[CMAKE] FindHarfBuzz: Handle harfbuzz / harfbuzz-icu split
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 16:48:19 +0000 (16:48 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 16:48:19 +0000 (16:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121688

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-09-20
Reviewed by Martin Robinson.

HarfBuzz 0.9.18 split ICU support into a separate harfbuzz-icu library.
To be able to build with earlier and newer versions of HarfBuzz, we should
check for harfbuzz-icu as well, if version >= 0.9.18.

* Source/cmake/FindHarfBuzz.cmake: Check for harfbuzz-icu, if version
>= 0.9.18.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156172 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/cmake/FindHarfBuzz.cmake

index a99b0753e640b248c76ac03ba8861c0519434554..487668e0a51c2eeee61b637bcb0c719e0170acf2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2013-09-20  Sergio Correia  <sergio.correia@openbossa.org>
+
+        [CMAKE] FindHarfBuzz: Handle harfbuzz / harfbuzz-icu split
+        https://bugs.webkit.org/show_bug.cgi?id=121688
+
+        Reviewed by Martin Robinson.
+
+        HarfBuzz 0.9.18 split ICU support into a separate harfbuzz-icu library.
+        To be able to build with earlier and newer versions of HarfBuzz, we should
+        check for harfbuzz-icu as well, if version >= 0.9.18.
+
+        * Source/cmake/FindHarfBuzz.cmake: Check for harfbuzz-icu, if version
+        >= 0.9.18.
+
 2013-09-16  Gustavo Noronha Silva  <gns@gnome.org>
 
         [GTK] Make symbol export filter more strict, and disable for dev/test builds
 2013-09-16  Gustavo Noronha Silva  <gns@gnome.org>
 
         [GTK] Make symbol export filter more strict, and disable for dev/test builds
index f8ca60521d8484279e94bcdbc734897138bbf2f2..2929900d586d44345ab1200981f9a1df8780ffc1 100644 (file)
@@ -42,5 +42,14 @@ find_library(HARFBUZZ_LIBRARIES NAMES harfbuzz
     HINTS ${PC_HARFBUZZ_LIBRARY_DIRS} ${PC_HARFBUZZ_LIBDIR}
 )
 
     HINTS ${PC_HARFBUZZ_LIBRARY_DIRS} ${PC_HARFBUZZ_LIBDIR}
 )
 
+# HarfBuzz 0.9.18 split ICU support into a separate harfbuzz-icu library.
+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)
 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(HarfBuzz DEFAULT_MSG HARFBUZZ_INCLUDE_DIRS HARFBUZZ_LIBRARIES)