Fix crash using built-in zlib functions from freetype

We must define FT_CONFIG_OPTION_SYSTEM_ZLIB to use zlib instead of the
built-in zlib functions in FreeType (which crash the program).
This commit is contained in:
David Capello 2022-05-09 15:40:34 -03:00
parent 5864e84d47
commit e823ee37e9

View File

@ -85,6 +85,8 @@ if(NOT USE_SHARED_FREETYPE AND NOT LAF_BACKEND STREQUAL "skia")
add_subdirectory(freetype2)
target_compile_definitions(freetype PUBLIC
FT_CONFIG_OPTION_SYSTEM_ZLIB)
if(UNIX)
target_include_directories(freetype BEFORE PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/freetype2/include)