blob: 79687933e314423ebc92b7170066f5efc576a17b [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',
scroggo@google.comd9ef3a22013-03-15 18:08:09 +000018 '../include/images',
bungeman@google.com29b63dc2012-03-29 14:28:59 +000019 '../include/ports',
djsollen@google.com52f02972013-06-03 12:10:19 +000020 '../include/utils',
djsollen@google.com28979312013-06-03 14:44:52 +000021 '../include/utils/win',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000022 '../src/core',
scroggo@google.comd9ef3a22013-03-15 18:08:09 +000023 '../src/lazy',
reed@google.come027a6e2013-07-31 17:37:31 +000024 '../src/ports',
djsollen@google.com52f02972013-06-03 12:10:19 +000025 '../src/sfnt',
bungeman@google.coma02bc152012-05-16 18:21:56 +000026 '../src/utils',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000027 ],
28 'sources': [
29 '../src/ports/SkDebug_stdio.cpp',
30 '../src/ports/SkDebug_win.cpp',
bungeman@google.combfc6cc42013-08-21 15:20:43 +000031
bungeman@google.com72cf4fc2014-03-21 22:48:32 +000032 '../src/fonts/SkFontMgr_indirect.cpp',
33 '../src/fonts/SkRemotableFontMgr.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000034 '../src/ports/SkFontHost_win.cpp',
bungeman@google.combfc6cc42013-08-21 15:20:43 +000035 '../src/ports/SkFontMgr_default_gdi.cpp',
36 '../src/ports/SkFontMgr_default_dw.cpp',
bungeman51daa252014-06-05 13:38:45 -070037 '../src/ports/SkFontMgr_win_dw.cpp',
bungeman@google.com72cf4fc2014-03-21 22:48:32 +000038 '../src/ports/SkRemotableFontMgr_win_dw.cpp',
Ben Wagner98875e12014-06-05 16:55:58 -040039 '../src/ports/SkScalerContext_win_dw.cpp',
bungeman51daa252014-06-05 13:38:45 -070040 '../src/ports/SkScalerContext_win_dw.h',
41 '../src/ports/SkTypeface_win_dw.cpp',
42 '../src/ports/SkTypeface_win_dw.h',
bungeman@google.combfc6cc42013-08-21 15:20:43 +000043
caryclark@google.comd26147a2011-12-15 14:16:43 +000044 '../src/ports/SkGlobalInitialization_default.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000045 '../src/ports/SkMemory_malloc.cpp',
bungeman@google.com6cab1a42013-05-29 13:43:31 +000046 '../src/ports/SkOSFile_posix.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000047 '../src/ports/SkOSFile_stdio.cpp',
bungeman@google.com6cab1a42013-05-29 13:43:31 +000048 '../src/ports/SkOSFile_win.cpp',
scroggo@google.com8b71ef12013-08-19 18:38:08 +000049 '../src/ports/SkDiscardableMemory_none.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000050 '../src/ports/SkTime_Unix.cpp',
51 '../src/ports/SkTime_win.cpp',
bungeman@google.comf2e7dbb2013-07-16 14:59:24 +000052 '../src/ports/SkTLS_pthread.cpp',
53 '../src/ports/SkTLS_win.cpp',
bungeman@google.com72cf4fc2014-03-21 22:48:32 +000054
55 '../include/ports/SkFontConfigInterface.h',
56 '../include/ports/SkFontMgr.h',
57 '../include/ports/SkFontMgr_indirect.h',
bungeman@google.com72cf4fc2014-03-21 22:48:32 +000058 '../include/ports/SkRemotableFontMgr.h',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000059 ],
60 'conditions': [
borenet48087572015-04-02 12:16:36 -070061 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos", "android"]', {
djsollen@google.com2679ff82013-07-22 14:12:56 +000062 'sources': [
63 '../src/ports/SkFontHost_FreeType.cpp',
64 '../src/ports/SkFontHost_FreeType_common.cpp',
borenet@google.com7158e6a2012-11-01 17:43:44 +000065 ],
djsollen@google.com2679ff82013-07-22 14:12:56 +000066 'dependencies': [
67 'freetype.gyp:freetype',
68 ],
69 }],
70 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +000071 'conditions': [
bungeman5c9fa282015-03-30 12:53:48 -070072 [ 'skia_embedded_fonts', {
73 'link_settings': {
74 'libraries': [
75 '-ldl',
76 ],
77 },
78 'variables': {
79 'embedded_font_data_identifier': 'sk_fonts',
80 'fonts_to_include': [
bungeman3ffa1262015-04-30 17:12:58 -040081 '../resources/fonts/Funkster.ttf',
bungeman5c9fa282015-03-30 12:53:48 -070082 ],
83 },
84 'sources': [
85 '../src/ports/SkFontHost_linux.cpp',
86 ],
87 'actions': [{
88 'action_name': 'generate_embedded_font_data',
89 'inputs': [
90 '../tools/embed_resources.py',
91 '<@(fonts_to_include)',
92 ],
93 'outputs': [
94 '<(SHARED_INTERMEDIATE_DIR)/ports/fonts/fonts.cpp',
95 ],
96 'action': ['python', '../tools/embed_resources.py',
97 '--align', '4',
98 '--name', '<(embedded_font_data_identifier)',
99 '--input', '<@(fonts_to_include)',
100 '--output', '<@(_outputs)',
101 ],
102 'message': 'Generating <@(_outputs)',
103 'process_outputs_as_sources': 1,
104 }],
105 'defines': [
106 'SK_EMBEDDED_FONTS=<(embedded_font_data_identifier)',
107 ],
108 }, 'skia_no_fontconfig', {
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000109 'link_settings': {
110 'libraries': [
111 '-ldl',
112 ],
113 },
114 'sources': [
115 '../src/ports/SkFontHost_linux.cpp',
116 ],
117 }, {
118 'link_settings': {
119 'libraries': [
120 '-lfontconfig',
121 '-ldl',
122 ],
123 },
124 'sources': [
bungemana6785cc2014-08-25 12:00:49 -0700125 '../src/ports/SkFontMgr_fontconfig.cpp',
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000126 '../src/ports/SkFontHost_fontconfig.cpp',
127 '../src/ports/SkFontConfigInterface_direct.cpp',
128 ],
129 }]
borenet@google.com7158e6a2012-11-01 17:43:44 +0000130 ],
131 }],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000132 [ 'skia_os == "mac"', {
133 'include_dirs': [
134 '../include/utils/mac',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000135 ],
136 'sources': [
mike@reedtribe.orgb103ed42013-03-03 03:50:09 +0000137 '../src/ports/SkFontHost_mac.cpp',
scroggo@google.comd9ef3a22013-03-15 18:08:09 +0000138 '../src/utils/mac/SkStream_mac.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000139 ],
reed@google.com17aa07d2012-02-23 14:51:10 +0000140 'sources!': [
141 '../src/ports/SkFontHost_tables.cpp',
142 ],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000143 }],
144 [ 'skia_os == "ios"', {
145 'include_dirs': [
146 '../include/utils/ios',
caryclark@google.com35f5ac92012-09-18 15:41:18 +0000147 '../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',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000152 ],
caryclark@google.com867cbd82012-09-20 15:45:41 +0000153 'sources!': [
154 '../src/ports/SkFontHost_tables.cpp',
155 ],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000156 }],
157 [ 'skia_os == "win"', {
158 'include_dirs': [
159 'config/win',
bungeman@google.come8f05922012-08-16 16:13:40 +0000160 '../src/utils/win',
161 ],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000162 'sources!': [ # these are used everywhere but windows
163 '../src/ports/SkDebug_stdio.cpp',
bungeman@google.com6cab1a42013-05-29 13:43:31 +0000164 '../src/ports/SkOSFile_posix.cpp',
bungeman@google.comf2e7dbb2013-07-16 14:59:24 +0000165 '../src/ports/SkTime_Unix.cpp',
166 '../src/ports/SkTLS_pthread.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000167 ],
bungeman@google.combfc6cc42013-08-21 15:20:43 +0000168 'conditions': [
169 # when we build for win, we only want one of these default files
Mike Klein93587062014-07-16 13:06:04 -0400170 [ 'skia_gdi', {
bungeman@google.combfc6cc42013-08-21 15:20:43 +0000171 'sources!': [
172 '../src/ports/SkFontMgr_default_dw.cpp',
173 ],
Mike Klein93587062014-07-16 13:06:04 -0400174 }, { # normally default to direct write
175 'sources!': [
176 '../src/ports/SkFontMgr_default_gdi.cpp',
177 ],
bungeman@google.combfc6cc42013-08-21 15:20:43 +0000178 }],
179 ],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000180 }, { # else !win
181 'sources!': [
182 '../src/ports/SkDebug_win.cpp',
183 '../src/ports/SkFontHost_win.cpp',
bungeman@google.combfc6cc42013-08-21 15:20:43 +0000184 '../src/ports/SkFontMgr_default_gdi.cpp',
185 '../src/ports/SkFontMgr_default_dw.cpp',
bungeman51daa252014-06-05 13:38:45 -0700186 '../src/ports/SkFontMgr_win_dw.cpp',
bungeman@google.com6cab1a42013-05-29 13:43:31 +0000187 '../src/ports/SkOSFile_win.cpp',
bungeman@google.com04c32a82014-03-21 23:19:10 +0000188 '../src/ports/SkRemotableFontMgr_win_dw.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000189 '../src/ports/SkTime_win.cpp',
bungeman@google.comf2e7dbb2013-07-16 14:59:24 +0000190 '../src/ports/SkTLS_win.cpp',
Ben Wagner98875e12014-06-05 16:55:58 -0400191 '../src/ports/SkScalerContext_win_dw.cpp',
bungeman51daa252014-06-05 13:38:45 -0700192 '../src/ports/SkScalerContext_win_dw.h',
193 '../src/ports/SkTypeface_win_dw.cpp',
194 '../src/ports/SkTypeface_win_dw.h',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000195 ],
196 }],
197 [ 'skia_os == "android"', {
198 'sources!': [
199 '../src/ports/SkDebug_stdio.cpp',
200 ],
201 'sources': [
202 '../src/ports/SkDebug_android.cpp',
djsollen@google.combfae9d32013-05-21 16:53:50 +0000203 '../src/ports/SkFontConfigParser_android.cpp',
bungeman8d84c992014-07-24 08:05:09 -0700204 '../src/ports/SkFontMgr_android.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000205 ],
djsollen@google.com62b24b12011-12-15 16:16:22 +0000206 'dependencies': [
borenet@google.comaf730912012-08-09 15:54:28 +0000207 'android_deps.gyp:expat',
djsollen@google.com62b24b12011-12-15 16:16:22 +0000208 ],
rmistry@google.comd6176b02012-08-23 18:14:13 +0000209 }],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000210 ],
211 'direct_dependent_settings': {
212 'include_dirs': [
213 '../include/ports',
214 ],
215 },
216 },
217 ],
218}