vcpkg/ports/harfbuzz/glib-cmake.patch

30 lines
1.2 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c52731..8305f27 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -314,22 +314,12 @@ endif ()
if (HB_HAVE_GLIB)
add_definitions(-DHAVE_GLIB)
- # 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(unofficial-glib CONFIG REQUIRED)
list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-glib.cc)
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-glib.h)
- 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 ()
if (HB_HAVE_ICU)