diff options
Diffstat (limited to 'build_files/cmake/platform/platform_unix.cmake')
-rw-r--r-- | build_files/cmake/platform/platform_unix.cmake | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index f6e233a0c86..0d7ed9d618c 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -96,6 +96,18 @@ find_package_wrapper(PNG REQUIRED) find_package_wrapper(ZLIB REQUIRED) find_package_wrapper(Zstd REQUIRED) +function(check_freetype_for_brotli) + include(CheckSymbolExists) + set(CMAKE_REQUIRED_INCLUDES ${FREETYPE_INCLUDE_DIRS}) + check_symbol_exists(FT_CONFIG_OPTION_USE_BROTLI + "freetype/config/ftconfig.h" HAVE_BROTLI) + if(NOT HAVE_BROTLI) + unset(HAVE_BROTLI CACHE) + message(FATAL_ERROR "Freetype needs to be compiled with brotli support!") + endif() + unset(HAVE_BROTLI CACHE) +endfunction() + if(NOT WITH_SYSTEM_FREETYPE) # FreeType compiled with Brotli compression for woff2. find_package_wrapper(Freetype REQUIRED) @@ -110,6 +122,7 @@ if(NOT WITH_SYSTEM_FREETYPE) # ${BROTLI_LIBRARIES} # ) endif() + check_freetype_for_brotli() endif() if(WITH_PYTHON) @@ -587,6 +600,7 @@ if(WITH_SYSTEM_FREETYPE) if(NOT FREETYPE_FOUND) message(FATAL_ERROR "Failed finding system FreeType version!") endif() + check_freetype_for_brotli() endif() if(WITH_LZO AND WITH_SYSTEM_LZO) @@ -789,7 +803,8 @@ if(CMAKE_COMPILER_IS_GNUCC) "The mold linker could not find the directory containing the linker command " "(typically " "\"${MOLD_PREFIX}/libexec/mold/ld\") or " - "\"${MOLD_PREFIX}/lib/mold/ld\") using system linker.") + "\"${MOLD_PREFIX}/lib/mold/ld\") using system linker." + ) set(WITH_LINKER_MOLD OFF) endif() unset(MOLD_PREFIX) @@ -928,7 +943,8 @@ function(CONFIGURE_ATOMIC_LIB_IF_NEEDED) int main(int argc, char **argv) { std::atomic<uint64_t> uint64; uint64++; return 0; - }") + }" + ) include(CheckCXXSourceCompiles) check_cxx_source_compiles("${_source}" ATOMIC_OPS_WITHOUT_LIBATOMIC) |