aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2015-07-15 10:58:47 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-15 10:58:47 -0700
commit786ece17c3fac1aae670a6206ad4d11471a2488e (patch)
tree20a7bf721b870184e780d7a340d6548395a5aec7 /gyp
parentdcd56e2f0e1bd31f260d19873be485340b66f096 (diff)
Allow Android font manager on *nix.
There is nothing left in the SkFontMgr_android.cpp which is specific to Android, so allow it to be built and used on *nix platforms. This allows for easier development and testing. The only reason to limit to *nix platforms are the dependencies on Expat and FreeType. This should be buildable and runnable on other platforms when these dependencies are also available. Review URL: https://codereview.chromium.org/1228833003
Diffstat (limited to 'gyp')
-rw-r--r--gyp/ports.gyp42
-rw-r--r--gyp/tests.gypi9
2 files changed, 16 insertions, 35 deletions
diff --git a/gyp/ports.gyp b/gyp/ports.gyp
index a0cfbd64da..9d63d5503a 100644
--- a/gyp/ports.gyp
+++ b/gyp/ports.gyp
@@ -77,29 +77,33 @@
'sources': [
'../src/ports/SkFontHost_FreeType.cpp',
'../src/ports/SkFontHost_FreeType_common.cpp',
+ '../src/ports/SkFontMgr_android.cpp',
+ '../src/ports/SkFontMgr_android_parser.cpp',
+ '../src/ports/SkFontMgr_custom.cpp',
],
'dependencies': [
'freetype.gyp:freetype',
],
- }],
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
'conditions': [
- [ 'skia_embedded_fonts', {
+ [ 'skia_os == "android"', {
+ 'dependencies': [
+ 'android_deps.gyp:expat',
+ ],
+ }, {
'link_settings': {
'libraries': [
'-ldl',
+ '-lexpat',
],
},
+ }],
+ [ 'skia_embedded_fonts', {
'variables': {
'embedded_font_data_identifier': 'sk_fonts',
'fonts_to_include': [
'../resources/fonts/Funkster.ttf',
],
},
- 'sources': [
- '../include/ports/SkFontMgr_custom.h',
- '../src/ports/SkFontMgr_custom.cpp',
- ],
'sources/': [['include', '../src/ports/SkFontMgr_custom_embedded_factory.cpp']],
'actions': [{
'action_name': 'generate_embedded_font_data',
@@ -123,21 +127,13 @@
'SK_EMBEDDED_FONTS=<(embedded_font_data_identifier)',
],
}, 'skia_no_fontconfig', {
- 'link_settings': {
- 'libraries': [
- '-ldl',
- ],
- },
- 'sources': [
- '../include/ports/SkFontMgr_custom.h',
- '../src/ports/SkFontMgr_custom.cpp',
- ],
'sources/': [['include', '../src/ports/SkFontMgr_custom_directory_factory.cpp']],
+ }, 'skia_os == "android"', {
+ 'sources/': [['include', '../src/ports/SkFontMgr_android_factory.cpp']],
}, {
'link_settings': {
'libraries': [
'-lfontconfig',
- '-ldl',
],
},
'sources': [
@@ -157,9 +153,6 @@
'../src/ports/SkFontHost_mac.cpp',
'../src/utils/mac/SkStream_mac.cpp',
],
- 'sources!': [
- '../src/ports/SkFontHost_tables.cpp',
- ],
}],
[ 'skia_os == "ios"', {
'include_dirs': [
@@ -170,9 +163,6 @@
'../src/ports/SkFontHost_mac.cpp',
'../src/utils/mac/SkStream_mac.cpp',
],
- 'sources!': [
- '../src/ports/SkFontHost_tables.cpp',
- ],
}],
[ 'skia_os == "win"', {
'include_dirs': [
@@ -214,12 +204,6 @@
],
'sources': [
'../src/ports/SkDebug_android.cpp',
- '../src/ports/SkFontMgr_android.cpp',
- '../src/ports/SkFontMgr_android_parser.cpp',
- ],
- 'sources/': [['include', '../src/ports/SkFontMgr_android_factory.cpp']],
- 'dependencies': [
- 'android_deps.gyp:expat',
],
}],
],
diff --git a/gyp/tests.gypi b/gyp/tests.gypi
index ea332bf294..e2de6048ff 100644
--- a/gyp/tests.gypi
+++ b/gyp/tests.gypi
@@ -13,6 +13,7 @@
'../src/images',
'../src/pathops',
'../src/pdf',
+ '../src/ports',
'../src/pipe/utils',
'../src/utils',
'../src/utils/debugger',
@@ -31,13 +32,9 @@
'tools.gyp:sk_tool_utils',
],
'conditions': [
- [ 'skia_os == "android"',
- {
- 'include_dirs': [ '../src/ports', ],
- }, {
+ [ 'skia_os not in ["linux", "freebsd", "openbsd", "solaris", "chromeos", "android"]', {
'sources!': [ '../tests/FontMgrAndroidParserTest.cpp', ],
- }
- ],
+ }],
[ 'skia_android_framework == 1', {
'libraries': [
'-ldl',