Add GpFontHandler_FreeType2 to CMake

Also add stddef.h include to GpRenderedGlyphMetrics.h to make size_t
visible. Does MSVC provide size_t by default, or via stdint.h? This
prevents compilation and I can't see how this would have compiled on
Windows otherwise.
This commit is contained in:
Diomendius
2024-06-16 23:18:53 +12:00
parent 5c74c96771
commit a7f5b653fa
2 changed files with 17 additions and 0 deletions

View File

@@ -442,4 +442,20 @@ target_include_directories(unpacktool PRIVATE
target_link_libraries(unpacktool PortabilityLayer MacRomanConversion) target_link_libraries(unpacktool PortabilityLayer MacRomanConversion)
find_package(Freetype)
if(FREETYPE_FOUND)
add_library(GpFontHandler_FreeType2 STATIC
GpFontHandler_FreeType2/GpFontHandler_FreeType2.cpp
)
target_include_directories(GpFontHandler_FreeType2 PRIVATE
Common
GpCommon
"${FREETYPE_INCLUDE_DIR_ft2build}"
)
target_link_libraries(GpFontHandler_FreeType2 PRIVATE Freetype::Freetype)
endif()
install (TARGETS ${EXECNAME}) install (TARGETS ${EXECNAME})

View File

@@ -1,5 +1,6 @@
#pragma once #pragma once
#include <stddef.h>
#include <stdint.h> #include <stdint.h>
struct GpRenderedGlyphMetrics struct GpRenderedGlyphMetrics