Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 04f39c0

Browse files
committed
[[ libcairo ]] Compile libcairo for Android
This patch enabled compiling of libcairo for Android with support for FreeType fonts
1 parent c7a6c8e commit 04f39c0

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

libcairo/libcairo.gyp

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,12 +460,26 @@
460460
'conditions':
461461
[
462462
[
463-
# Not supported on Android
464-
'OS == "android" or OS == "emscripten"',
463+
# Not supported on Emscripten
464+
'OS == "emscripten"',
465465
{
466466
'type': 'none',
467467
},
468468
],
469+
[
470+
'OS == "android"',
471+
{
472+
'dependencies':
473+
[
474+
'../libfreetype/libfreetype.gyp:libfreetype',
475+
],
476+
# Use the FreeType support on Android
477+
'sources/':
478+
[
479+
['include', '^src/cairo-ft.*\\.c$'],
480+
],
481+
},
482+
],
469483
[
470484
# Re-add the OSX- and iOS-specific support
471485
'OS == "mac" or OS == "ios"',

libcairo/src/cairo-features.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,10 @@
4141
#define CAIRO_HAS_FC_FONT 1
4242
#endif
4343

44+
#ifdef TARGET_SUBPLATFORM_ANDROID
45+
#define CAIRO_NO_MUTEX 1
46+
#define HAVE_STDINT_H 1
47+
#define CAIRO_HAS_FT_FONT 1
48+
#endif
49+
4450
#endif

0 commit comments

Comments
 (0)