Fix Debian build

This commit is contained in:
Sergey Bugaev 2017-07-24 00:38:29 +03:00
parent 0e8e8c38da
commit 5c69ad493d
5 changed files with 39 additions and 0 deletions

View File

@ -8,6 +8,10 @@
#import <AppKit/KTFont.h>
#ifdef DARLING
#define __linux__
#endif
#import <stddef.h>
#import <ft2build.h>
@ -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

View File

@ -1,6 +1,15 @@
#import <Onyx2D/O2Geometry.h>
#ifdef DARLING
#define __linux__
#endif
#import <cairo/cairo-ft.h>
#ifdef DARLING
#undef __linux__
#endif
@class O2Font_FT;
@interface O2FontState_cairo : NSObject {

View File

@ -1,11 +1,19 @@
#import <Onyx2D/O2Font.h>
#ifdef DARLING
#define __linux__
#endif
#import <stddef.h>
#import <ft2build.h>
#import FT_FREETYPE_H
#import FT_RENDER_H
#import <fontconfig/fontconfig.h>
#ifdef DARLING
#undef __linux__
#endif
@interface O2Font_FT : O2Font {
FT_Face _face;
}

View File

@ -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

View File

@ -3,9 +3,17 @@
#ifdef FREETYPE_PRESENT
#ifdef DARLING
#define __linux__
#endif
#include <ft2build.h>
#include FT_FREETYPE_H
#ifdef DARLING
#undef __linux__
#endif
@interface O2Font_freetype : O2Font {
FT_Face _face;
FT_Encoding _ftEncoding;