From 5c69ad493dd188d6874dc0e5ddce7dd001c5c8e1 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Mon, 24 Jul 2017 00:38:29 +0300 Subject: [PATCH] Fix Debian build --- AppKit/X11.subproj/KTFont_FT.h | 8 ++++++++ AppKit/X11.subproj/O2FontState_cairo.h | 9 +++++++++ AppKit/X11.subproj/O2Font_FT.h | 8 ++++++++ Onyx2D/CMakeLists.txt | 6 ++++++ Onyx2D/O2Font_freetype.h | 8 ++++++++ 5 files changed, 39 insertions(+) diff --git a/AppKit/X11.subproj/KTFont_FT.h b/AppKit/X11.subproj/KTFont_FT.h index 8c4ff70b..4d92a52a 100644 --- a/AppKit/X11.subproj/KTFont_FT.h +++ b/AppKit/X11.subproj/KTFont_FT.h @@ -8,6 +8,10 @@ #import +#ifdef DARLING +#define __linux__ +#endif + #import #import @@ -17,6 +21,10 @@ typedef int ptrdiff_t; #import FT_FREETYPE_H #import FT_RENDER_H +#ifdef DARLING +#undef __linux__ +#endif + @class NSSet; @interface KTFont_FT : KTFont diff --git a/AppKit/X11.subproj/O2FontState_cairo.h b/AppKit/X11.subproj/O2FontState_cairo.h index 8f723eaa..f95db95a 100644 --- a/AppKit/X11.subproj/O2FontState_cairo.h +++ b/AppKit/X11.subproj/O2FontState_cairo.h @@ -1,6 +1,15 @@ #import + +#ifdef DARLING +#define __linux__ +#endif + #import +#ifdef DARLING +#undef __linux__ +#endif + @class O2Font_FT; @interface O2FontState_cairo : NSObject { diff --git a/AppKit/X11.subproj/O2Font_FT.h b/AppKit/X11.subproj/O2Font_FT.h index 7d7e4140..5573971a 100644 --- a/AppKit/X11.subproj/O2Font_FT.h +++ b/AppKit/X11.subproj/O2Font_FT.h @@ -1,11 +1,19 @@ #import +#ifdef DARLING +#define __linux__ +#endif + #import #import #import FT_FREETYPE_H #import FT_RENDER_H #import +#ifdef DARLING +#undef __linux__ +#endif + @interface O2Font_FT : O2Font { FT_Face _face; } diff --git a/Onyx2D/CMakeLists.txt b/Onyx2D/CMakeLists.txt index c738d9de..30acaaff 100644 --- a/Onyx2D/CMakeLists.txt +++ b/Onyx2D/CMakeLists.txt @@ -13,6 +13,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \ ) find_package(Freetype REQUIRED) +find_package(PNG REQUIRED) +find_package(TIFF REQUIRED) +find_package(JPEG REQUIRED) include_directories( ${CMAKE_SOURCE_DIR}/src/external/foundation/include @@ -37,6 +40,9 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../CoreText ${FREETYPE_INCLUDE_DIRS} + ${PNG_INCLUDE_DIRS} + ${TIFF_INCLUDE_DIRS} + ${JPEG_INCLUDE_DIRS} ) set(Onyx2D_sources diff --git a/Onyx2D/O2Font_freetype.h b/Onyx2D/O2Font_freetype.h index 22eebf6c..6898ccf7 100644 --- a/Onyx2D/O2Font_freetype.h +++ b/Onyx2D/O2Font_freetype.h @@ -3,9 +3,17 @@ #ifdef FREETYPE_PRESENT +#ifdef DARLING +#define __linux__ +#endif + #include #include FT_FREETYPE_H +#ifdef DARLING +#undef __linux__ +#endif + @interface O2Font_freetype : O2Font { FT_Face _face; FT_Encoding _ftEncoding;