aboutsummaryrefslogtreecommitdiff
path: root/ports/harfbuzz/icu.patch
blob: 1747c4a7df23e8e09529e5c9c6dfeeb1e4da9546 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb6cc9007..209128695 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -226,19 +226,13 @@ if (HB_HAVE_ICU)
   add_definitions(-DHAVE_ICU)
 
   # https://github.com/WebKit/webkit/blob/master/Source/cmake/FindICU.cmake
-  find_package(PkgConfig)
-  pkg_check_modules(PC_ICU QUIET icu-uc)
-
-  find_path(ICU_INCLUDE_DIR NAMES unicode/utypes.h HINTS ${PC_ICU_INCLUDE_DIRS} ${PC_ICU_INCLUDEDIR})
-  find_library(ICU_LIBRARY NAMES libicuuc cygicuuc cygicuuc32 icuuc HINTS ${PC_ICU_LIBRARY_DIRS} ${PC_ICU_LIBDIR})
+  find_package(ICU COMPONENTS uc REQUIRED)
 
-  include_directories(${ICU_INCLUDE_DIR})
+  include_directories(${ICU_INCLUDE_DIRS})
 
   list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-icu.h)
 
-  list(APPEND THIRD_PARTY_LIBS ${ICU_LIBRARY})
-
-  mark_as_advanced(ICU_INCLUDE_DIR ICU_LIBRARY)
+  list(APPEND THIRD_PARTY_LIBS ${ICU_LIBRARIES})
 endif ()
 
 if (APPLE AND HB_HAVE_CORETEXT)