summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNikolaus Waxweiler <madigens@gmail.com>2021-05-15 22:36:00 +0100
committerNikolaus Waxweiler <madigens@gmail.com>2021-05-19 21:53:21 +0100
commitebf9e5ac719a5a1a374dbf2dd6b12e84de9466ed (patch)
treec6712d03429935f3dbc801f14eb19d767a2711d6 /CMakeLists.txt
parent06e21ffedfac81edfa79137959141a9d78b6f858 (diff)
downloadfreetype2-ebf9e5ac719a5a1a374dbf2dd6b12e84de9466ed.tar.gz
[CMake] Update dependency finders.
1. Fixes CMake using any found HarfBuzz version lower than the minimum required. This is based on HALX99's merge request at https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/31 2. Update FindHarfBuzz.cmake from https://github.com/WebKit/WebKit/blob/1ce32454/Source/cmake/FindHarfBuzz.cmake and guard post-CMake-3.1 features to keep the minimum version unchanged 3. Update FindBrotliDec.cmake to stop the warnings, based on what https://github.com/google/woff2/blob/a0d0ed7d/cmake/FindBrotliDec.cmake is doing * CMakeLists.txt, builds/cmake/FindHarfBuzz.cmake: Implement 1 and 2. * builds/cmake/FindBrotliDec.cmake: Implement 3.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ffb7c4801..e9b6fb6d5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -103,6 +103,9 @@ if (NOT CMAKE_VERSION VERSION_LESS 3.3)
# Allow symbol visibility settings also on static libraries. CMake < 3.3
# only sets the property on a shared library build.
cmake_policy(SET CMP0063 NEW)
+
+ # Support new IN_LIST if() operator.
+ cmake_policy(SET CMP0057 NEW)
endif ()
include(CheckIncludeFile)
@@ -461,9 +464,9 @@ if (PNG_FOUND)
target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS})
list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "libpng")
endif ()
-if (HARFBUZZ_FOUND)
- target_link_libraries(freetype PRIVATE ${HARFBUZZ_LIBRARIES})
- target_include_directories(freetype PRIVATE ${HARFBUZZ_INCLUDE_DIRS})
+if (HarfBuzz_FOUND)
+ target_link_libraries(freetype PRIVATE ${HarfBuzz_LIBRARY})
+ target_include_directories(freetype PRIVATE ${HarfBuzz_INCLUDE_DIRS})
list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}")
endif ()
if (BROTLIDEC_FOUND)