vcpkg/ports/harfbuzz/glib-cmake.patch
Todor Prokopov ffbff8caab Wt Linux fixes (#4927)
* [harfbuzz] Fix build on Linux

* [cairo] Fix build on Linux

* [pango] Fix build on Linux

* [wt] Fix build on Linux

* [wt] Fix linking with -lcrypto
2018-12-17 16:30:27 -08:00

32 lines
1.3 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d6e77e8..36e4b4e6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -306,22 +306,14 @@ 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(Threads REQUIRED)
+ find_package(unofficial-iconv REQUIRED)
+ 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)