1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-26 02:07:26 +00:00

unfuck freetype.cmake

This commit is contained in:
fgenesis 2024-07-16 03:10:17 +02:00
parent 296c89ee7e
commit ab9193d1a9

View file

@ -51,24 +51,23 @@ if(AQUARIA_INTERNAL_FREETYPE)
${FREETYPE2SRCDIR}/psnames/psmodule.c ${FREETYPE2SRCDIR}/psnames/psmodule.c
) )
IF(MSVC) INCLUDE_DIRECTORIES("${FREETYPE2SRCDIR}")
SET_SOURCE_FILES_PROPERTIES( INCLUDE_DIRECTORIES("${FREETYPE2DIR}/include/freetype/config")
${FREETYPE2_SRCS} ADD_DEFINITIONS(-DHAVE_FCNTTL_H)
PROPERTIES COMPILE_FLAGS "-DFT_CONFIG_OPTION_SYSTEM_ZLIB -DFT2_BUILD_LIBRARY -I${FREETYPE2SRCDIR} -I${FREETYPE2DIR}/include/freetype/config -DHAVE_FCNTL_H" ADD_DEFINITIONS(-DFT_CONFIG_OPTION_SYSTEM_ZLIB)
) ADD_DEFINITIONS(-DFT2_BUILD_LIBRARY)
ELSE(MSVC)
IF(NOT MSVC)
# FT2 seems to not be strict-aliasing safe, so disable that in GCC. # FT2 seems to not be strict-aliasing safe, so disable that in GCC.
CHECK_C_COMPILER_FLAG("-fno-strict-aliasing" COMPILER_HAS_NOSTRICTALIAS) CHECK_C_COMPILER_FLAG("-fno-strict-aliasing" COMPILER_HAS_NOSTRICTALIAS)
IF(COMPILER_HAS_NOSTRICTALIAS) IF(COMPILER_HAS_NOSTRICTALIAS)
SET(NOSTRICTALIAS "-fno-strict-aliasing") ADD_DEFINITIONS(-fno-strict-aliasing)
ELSE(COMPILER_HAS_NOSTRICTALIAS)
SET(NOSTRICTALIAS "")
ENDIF(COMPILER_HAS_NOSTRICTALIAS) ENDIF(COMPILER_HAS_NOSTRICTALIAS)
SET_SOURCE_FILES_PROPERTIES(
${FREETYPE2_SRCS} ADD_DEFINITIONS(-DFT_CONFIG_CONFIG_H="${FREETYPE2DIR}/include/freetype/config/ftconfig.h")
PROPERTIES COMPILE_FLAGS "-Wno-extended-offsetof -DFT_CONFIG_OPTION_SYSTEM_ZLIB -DFT_CONFIG_CONFIG_H='\"${FREETYPE2DIR}/include/freetype/config/ftconfig.h\"' -DFT2_BUILD_LIBRARY -DFT_CONFIG_MODULES_H='\"${FREETYPE2DIR}/include/freetype/config/ftmodule.h\"' -I${FREETYPE2SRCDIR} -I${FREETYPE2DIR}/include/freetype/config -DHAVE_FCNTL_H ${NOSTRICTALIAS}" ADD_DEFINITIONS(-DFT_CONFIG_MODULES_H="${FREETYPE2DIR}/include/freetype/config/ftmodule.h")
) ADD_DEFINITIONS(-Wno-extended-offsetof)
ENDIF(MSVC) ENDIF(NOT MSVC)
add_library(freetype ${FREETYPE2_SRCS}) add_library(freetype ${FREETYPE2_SRCS})