Skip to content

Commit 5392472

Browse files
committed
apple silcon build of the menu native library.
1 parent ff00df6 commit 5392472

7 files changed

Lines changed: 252 additions & 111 deletions

File tree

tcMenuNative/.idea/editor.xml

Lines changed: 244 additions & 98 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tcMenuNative/.idea/fontGlyphGenerator.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tcMenuNative/CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,18 @@ endif()
2121
add_library(tcMenuNative SHARED library.cpp FreeFontHandler.cpp)
2222

2323
# Pull in the free type headers.
24-
if(UNIX AND NOT APPLE)
25-
# I don't like this but for now we need to do this as the find_package doesn't
26-
# correctly locate the includes.
27-
target_include_directories(tcMenuNative PRIVATE /usr/include/freetype2)
24+
if(UNIX)
25+
target_include_directories(tcMenuNative PRIVATE ${FREETYPE_INCLUDE_DIRS})
2826
else ()
2927
target_include_directories(tcMenuNative PRIVATE ${FREETYPE_DIR})
3028
endif ()
3129

3230
if(UNIX)
3331
# On unix we need to link against the three libraries needed by freetype, these were found above using find_package
3432
target_link_libraries(tcMenuNative
35-
${FREETYPE_LIBRARY}
36-
${PNG_LIBRARY}
37-
${ZLIB_LIBRARY})
33+
${FREETYPE_LIBRARIES}
34+
${PNG_LIBRARIES}
35+
${ZLIB_LIBRARIES})
3836
else ()
3937
# on windows however, we need to build freetype from source in release mode as a static library. Consult the freetype
4038
# docs if you don't want to use the tcMenuPackaged one

tcMenuNative/FreeFontHandler.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44
#include <vector>
55
#include <map>
66
#include "library.h"
7-
#if __has_include ("freetype/freetype.h")
8-
#include "freetype/freetype.h"
9-
#else
10-
#include "freetype2/freetype/freetype.h"
11-
#endif // free type include
7+
#include <ft2build.h>
8+
#include FT_FREETYPE_H
129

1310
class FreeFontHandler;
1411

55.2 KB
Binary file not shown.
35 KB
Binary file not shown.

0 commit comments

Comments
 (0)