2019-03-16 13:08:07 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2020-05-20 06:20:18 +08:00
|
|
|
index 9b21bef2c..ae741ef63 100644
|
2019-03-16 13:08:07 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2020-05-20 06:20:18 +08:00
|
|
|
@@ -213,21 +213,13 @@ endif ()
|
2019-03-16 13:08:07 +08:00
|
|
|
if (HB_HAVE_GLIB)
|
|
|
|
add_definitions(-DHAVE_GLIB)
|
2020-05-20 06:20:18 +08:00
|
|
|
|
2019-03-16 13:08:07 +08:00
|
|
|
- # https://github.com/WebKit/webkit/blob/master/Source/cmake/FindGLIB.cmake
|
|
|
|
- find_package(PkgConfig)
|
|
|
|
- pkg_check_modules(PC_GLIB QUIET glib-2.0)
|
|
|
|
-
|
|
|
|
- find_library(GLIB_LIBRARIES NAMES glib-2.0 HINTS ${PC_GLIB_LIBDIR} ${PC_GLIB_LIBRARY_DIRS})
|
|
|
|
- find_path(GLIBCONFIG_INCLUDE_DIR NAMES glibconfig.h HINTS ${PC_LIBDIR} ${PC_LIBRARY_DIRS} ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0/include)
|
|
|
|
- find_path(GLIB_INCLUDE_DIR NAMES glib.h HINTS ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0)
|
|
|
|
-
|
|
|
|
- include_directories(${GLIBCONFIG_INCLUDE_DIR} ${GLIB_INCLUDE_DIR})
|
|
|
|
+ find_package(Threads REQUIRED)
|
|
|
|
+ find_package(unofficial-iconv REQUIRED)
|
|
|
|
+ find_package(unofficial-glib CONFIG REQUIRED)
|
2020-05-20 06:20:18 +08:00
|
|
|
|
2019-03-16 13:08:07 +08:00
|
|
|
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-glib.h)
|
2020-05-20 06:20:18 +08:00
|
|
|
|
2019-03-16 13:08:07 +08:00
|
|
|
- list(APPEND THIRD_PARTY_LIBS ${GLIB_LIBRARIES})
|
|
|
|
-
|
|
|
|
- mark_as_advanced(GLIB_LIBRARIES GLIBCONFIG_INCLUDE_DIR GLIB_INCLUDE_DIR)
|
|
|
|
+ list(APPEND THIRD_PARTY_LIBS unofficial::glib::glib)
|
|
|
|
endif ()
|
2020-05-20 06:20:18 +08:00
|
|
|
|
2019-03-16 13:08:07 +08:00
|
|
|
if (HB_HAVE_ICU)
|