blob: 7bb403da5724f552e314c0f0d6d55d49f682e87c [file] [log] [blame]
scroggo3e562272015-03-25 10:22:41 -07001# Copyright 2015 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
caryclark@google.comafcb55c2011-12-14 17:12:04 +00005# Port-specific Skia library code.
6{
caryclark@google.comafcb55c2011-12-14 17:12:04 +00007 'targets': [
8 {
9 'target_name': 'ports',
borenet@google.comefb1d772012-10-10 19:45:51 +000010 'product_name': 'skia_ports',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000011 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +000012 'standalone_static_library': 1,
bungeman@google.comb8f36552013-07-22 14:39:45 +000013 'dependencies': [
14 'core.gyp:*',
15 ],
caryclark@google.comafcb55c2011-12-14 17:12:04 +000016 'include_dirs': [
bungeman@google.com5a64e582012-03-29 14:51:56 +000017 '../include/effects',
robertphillips188d44c2016-02-01 04:54:14 -080018 '../include/client/android',
dvonbeck9b03e7b2016-08-01 11:01:56 -070019 '../include/gpu',
scroggo@google.comd9ef3a22013-03-15 18:08:09 +000020 '../include/images',
bungeman@google.com29b63dc2012-03-29 14:28:59 +000021 '../include/ports',
mtkleincd1f2da2015-07-28 08:55:14 -070022 '../include/private',
djsollen@google.com52f02972013-06-03 12:10:19 +000023 '../include/utils',
djsollen@google.com28979312013-06-03 14:44:52 +000024 '../include/utils/win',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000025 '../src/core',
dvonbeck9b03e7b2016-08-01 11:01:56 -070026 '../src/gpu',
halcanaryba923d32015-12-07 12:02:33 -080027 '../src/image',
scroggo@google.comd9ef3a22013-03-15 18:08:09 +000028 '../src/lazy',
reed@google.come027a6e2013-07-31 17:37:31 +000029 '../src/ports',
djsollen@google.com52f02972013-06-03 12:10:19 +000030 '../src/sfnt',
bungeman@google.coma02bc152012-05-16 18:21:56 +000031 '../src/utils',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000032 ],
33 'sources': [
34 '../src/ports/SkDebug_stdio.cpp',
35 '../src/ports/SkDebug_win.cpp',
bungeman@google.combfc6cc42013-08-21 15:20:43 +000036
bungeman@google.com72cf4fc2014-03-21 22:48:32 +000037 '../src/fonts/SkFontMgr_indirect.cpp',
38 '../src/fonts/SkRemotableFontMgr.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000039 '../src/ports/SkFontHost_win.cpp',
bungeman77f85ad2015-06-17 12:07:10 -070040 '../src/ports/SkFontMgr_android_factory.cpp',
bungeman5cf19492015-06-15 15:17:21 -070041 '../src/ports/SkFontMgr_custom_directory_factory.cpp',
42 '../src/ports/SkFontMgr_custom_embedded_factory.cpp',
bungeman7d0e3bc2016-08-02 07:07:33 -070043 '../src/ports/SkFontMgr_FontConfigInterface_factory.cpp',
bungeman0b1de262015-06-17 07:55:59 -070044 '../src/ports/SkFontMgr_fontconfig_factory.cpp',
bungeman51daa252014-06-05 13:38:45 -070045 '../src/ports/SkFontMgr_win_dw.cpp',
bungeman5cf19492015-06-15 15:17:21 -070046 '../src/ports/SkFontMgr_win_dw_factory.cpp',
47 '../src/ports/SkFontMgr_win_gdi_factory.cpp',
bungeman@google.com72cf4fc2014-03-21 22:48:32 +000048 '../src/ports/SkRemotableFontMgr_win_dw.cpp',
Ben Wagner98875e12014-06-05 16:55:58 -040049 '../src/ports/SkScalerContext_win_dw.cpp',
bungeman51daa252014-06-05 13:38:45 -070050 '../src/ports/SkScalerContext_win_dw.h',
51 '../src/ports/SkTypeface_win_dw.cpp',
52 '../src/ports/SkTypeface_win_dw.h',
bungeman@google.combfc6cc42013-08-21 15:20:43 +000053
caryclark@google.comd26147a2011-12-15 14:16:43 +000054 '../src/ports/SkGlobalInitialization_default.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000055 '../src/ports/SkMemory_malloc.cpp',
bungeman@google.com6cab1a42013-05-29 13:43:31 +000056 '../src/ports/SkOSFile_posix.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000057 '../src/ports/SkOSFile_stdio.cpp',
bungeman@google.com6cab1a42013-05-29 13:43:31 +000058 '../src/ports/SkOSFile_win.cpp',
hendrikwb1ac52f2015-10-01 18:29:34 -070059 '../src/ports/SkOSLibrary.h',
60 '../src/ports/SkOSLibrary_posix.cpp',
61 '../src/ports/SkOSLibrary_win.cpp',
scroggo@google.com8b71ef12013-08-19 18:38:08 +000062 '../src/ports/SkDiscardableMemory_none.cpp',
bungeman@google.comf2e7dbb2013-07-16 14:59:24 +000063 '../src/ports/SkTLS_pthread.cpp',
64 '../src/ports/SkTLS_win.cpp',
bungeman@google.com72cf4fc2014-03-21 22:48:32 +000065
66 '../include/ports/SkFontConfigInterface.h',
67 '../include/ports/SkFontMgr.h',
bungeman77f85ad2015-06-17 12:07:10 -070068 '../include/ports/SkFontMgr_android.h',
bungeman0b1de262015-06-17 07:55:59 -070069 '../include/ports/SkFontMgr_custom.h',
70 '../include/ports/SkFontMgr_fontconfig.h',
bungeman1ae0e012016-09-19 12:13:16 -070071 '../include/ports/SkFontMgr_FontConfigInterface.h',
bungeman@google.com72cf4fc2014-03-21 22:48:32 +000072 '../include/ports/SkFontMgr_indirect.h',
bungeman@google.com72cf4fc2014-03-21 22:48:32 +000073 '../include/ports/SkRemotableFontMgr.h',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000074 ],
bungeman5cf19492015-06-15 15:17:21 -070075 'sources/': [
76 ['exclude', 'SkFontMgr_.+_factory\\.cpp$'],
77 ],
caryclark@google.comafcb55c2011-12-14 17:12:04 +000078 'conditions': [
borenet43bf5112016-04-29 14:01:34 -070079 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android"]', {
djsollen@google.com2679ff82013-07-22 14:12:56 +000080 'sources': [
81 '../src/ports/SkFontHost_FreeType.cpp',
82 '../src/ports/SkFontHost_FreeType_common.cpp',
bungeman786ece12015-07-15 10:58:47 -070083 '../src/ports/SkFontMgr_android.cpp',
84 '../src/ports/SkFontMgr_android_parser.cpp',
85 '../src/ports/SkFontMgr_custom.cpp',
bungeman7d0e3bc2016-08-02 07:07:33 -070086 '../src/ports/SkFontMgr_FontConfigInterface.cpp',
borenet@google.com7158e6a2012-11-01 17:43:44 +000087 ],
djsollen@google.com2679ff82013-07-22 14:12:56 +000088 'dependencies': [
89 'freetype.gyp:freetype',
djsollenec58b862016-07-15 12:52:34 -070090 'expat.gyp:expat',
djsollen@google.com2679ff82013-07-22 14:12:56 +000091 ],
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000092 'conditions': [
djsollenec58b862016-07-15 12:52:34 -070093 [ 'skia_android_framework == 0', {
mtklein4e79f332016-02-07 13:31:23 -080094 'link_settings': { 'libraries': [ '-ldl' ] },
bungeman786ece12015-07-15 10:58:47 -070095 }],
96 [ 'skia_embedded_fonts', {
bungeman5c9fa282015-03-30 12:53:48 -070097 'variables': {
98 'embedded_font_data_identifier': 'sk_fonts',
99 'fonts_to_include': [
bungeman3ffa1262015-04-30 17:12:58 -0400100 '../resources/fonts/Funkster.ttf',
bungeman5c9fa282015-03-30 12:53:48 -0700101 ],
102 },
bungeman5cf19492015-06-15 15:17:21 -0700103 'sources/': [['include', '../src/ports/SkFontMgr_custom_embedded_factory.cpp']],
bungeman5c9fa282015-03-30 12:53:48 -0700104 'actions': [{
105 'action_name': 'generate_embedded_font_data',
106 'inputs': [
107 '../tools/embed_resources.py',
108 '<@(fonts_to_include)',
109 ],
110 'outputs': [
111 '<(SHARED_INTERMEDIATE_DIR)/ports/fonts/fonts.cpp',
112 ],
113 'action': ['python', '../tools/embed_resources.py',
114 '--align', '4',
115 '--name', '<(embedded_font_data_identifier)',
116 '--input', '<@(fonts_to_include)',
117 '--output', '<@(_outputs)',
118 ],
119 'message': 'Generating <@(_outputs)',
120 'process_outputs_as_sources': 1,
121 }],
122 'defines': [
123 'SK_EMBEDDED_FONTS=<(embedded_font_data_identifier)',
124 ],
125 }, 'skia_no_fontconfig', {
bungeman5cf19492015-06-15 15:17:21 -0700126 'sources/': [['include', '../src/ports/SkFontMgr_custom_directory_factory.cpp']],
bungeman786ece12015-07-15 10:58:47 -0700127 }, 'skia_os == "android"', {
128 'sources/': [['include', '../src/ports/SkFontMgr_android_factory.cpp']],
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000129 }, {
130 'link_settings': {
131 'libraries': [
132 '-lfontconfig',
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000133 ],
134 },
135 'sources': [
bungemana6785cc2014-08-25 12:00:49 -0700136 '../src/ports/SkFontMgr_fontconfig.cpp',
bungeman1ae0e012016-09-19 12:13:16 -0700137 '../src/ports/SkFontConfigInterface.cpp',
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000138 '../src/ports/SkFontConfigInterface_direct.cpp',
benjaminwagner2211a7b2015-12-01 11:12:05 -0800139 '../src/ports/SkFontConfigInterface_direct_factory.cpp',
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000140 ],
bungeman0b1de262015-06-17 07:55:59 -0700141 'sources/': [['include', '../src/ports/SkFontMgr_fontconfig_factory.cpp']],
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000142 }]
borenet@google.com7158e6a2012-11-01 17:43:44 +0000143 ],
144 }],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000145 [ 'skia_os == "mac"', {
146 'include_dirs': [
147 '../include/utils/mac',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000148 ],
149 'sources': [
mike@reedtribe.orgb103ed42013-03-03 03:50:09 +0000150 '../src/ports/SkFontHost_mac.cpp',
scroggo@google.comd9ef3a22013-03-15 18:08:09 +0000151 '../src/utils/mac/SkStream_mac.cpp',
msarett18976312016-03-09 14:20:58 -0800152
153 '../src/ports/SkImageGeneratorCG.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000154 ],
155 }],
156 [ 'skia_os == "ios"', {
157 'include_dirs': [
158 '../include/utils/ios',
caryclark@google.com35f5ac92012-09-18 15:41:18 +0000159 '../include/utils/mac',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000160 ],
161 'sources': [
mike@reedtribe.orgb103ed42013-03-03 03:50:09 +0000162 '../src/ports/SkFontHost_mac.cpp',
scroggo@google.comd9ef3a22013-03-15 18:08:09 +0000163 '../src/utils/mac/SkStream_mac.cpp',
msarett18976312016-03-09 14:20:58 -0800164
165 '../src/ports/SkImageGeneratorCG.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000166 ],
167 }],
168 [ 'skia_os == "win"', {
169 'include_dirs': [
170 'config/win',
bungeman@google.come8f05922012-08-16 16:13:40 +0000171 '../src/utils/win',
172 ],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000173 'sources!': [ # these are used everywhere but windows
174 '../src/ports/SkDebug_stdio.cpp',
bungeman@google.com6cab1a42013-05-29 13:43:31 +0000175 '../src/ports/SkOSFile_posix.cpp',
hendrikwb1ac52f2015-10-01 18:29:34 -0700176 '../src/ports/SkOSLibrary_posix.cpp',
bungeman@google.comf2e7dbb2013-07-16 14:59:24 +0000177 '../src/ports/SkTLS_pthread.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000178 ],
msarettfc0b6d12016-03-17 13:50:17 -0700179 'sources': [
180 '../src/ports/SkImageGeneratorWIC.cpp',
181 ],
bungeman@google.combfc6cc42013-08-21 15:20:43 +0000182 'conditions': [
183 # when we build for win, we only want one of these default files
Mike Klein93587062014-07-16 13:06:04 -0400184 [ 'skia_gdi', {
bungeman5cf19492015-06-15 15:17:21 -0700185 'sources/': [['include', '../src/ports/SkFontMgr_win_gdi_factory.cpp']],
Mike Klein93587062014-07-16 13:06:04 -0400186 }, { # normally default to direct write
bungeman5cf19492015-06-15 15:17:21 -0700187 'sources/': [['include', '../src/ports/SkFontMgr_win_dw_factory.cpp']],
bungeman@google.combfc6cc42013-08-21 15:20:43 +0000188 }],
189 ],
msarettfc0b6d12016-03-17 13:50:17 -0700190 'link_settings': {
191 'libraries': [
192 '-lwindowscodecs.lib',
193 ],
194 },
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000195 }, { # else !win
196 'sources!': [
197 '../src/ports/SkDebug_win.cpp',
198 '../src/ports/SkFontHost_win.cpp',
bungeman51daa252014-06-05 13:38:45 -0700199 '../src/ports/SkFontMgr_win_dw.cpp',
bungeman@google.com6cab1a42013-05-29 13:43:31 +0000200 '../src/ports/SkOSFile_win.cpp',
hendrikwb1ac52f2015-10-01 18:29:34 -0700201 '../src/ports/SkOSLibrary_win.cpp',
bungeman@google.com04c32a82014-03-21 23:19:10 +0000202 '../src/ports/SkRemotableFontMgr_win_dw.cpp',
bungeman@google.comf2e7dbb2013-07-16 14:59:24 +0000203 '../src/ports/SkTLS_win.cpp',
Ben Wagner98875e12014-06-05 16:55:58 -0400204 '../src/ports/SkScalerContext_win_dw.cpp',
bungeman51daa252014-06-05 13:38:45 -0700205 '../src/ports/SkScalerContext_win_dw.h',
206 '../src/ports/SkTypeface_win_dw.cpp',
207 '../src/ports/SkTypeface_win_dw.h',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000208 ],
209 }],
210 [ 'skia_os == "android"', {
211 'sources!': [
212 '../src/ports/SkDebug_stdio.cpp',
213 ],
214 'sources': [
215 '../src/ports/SkDebug_android.cpp',
djsollen@google.com62b24b12011-12-15 16:16:22 +0000216 ],
rmistry@google.comd6176b02012-08-23 18:14:13 +0000217 }],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000218 ],
219 'direct_dependent_settings': {
220 'include_dirs': [
221 '../include/ports',
222 ],
223 },
224 },
225 ],
226}