blob: a84f7883d726ffa10520761593bbac860bbd603c [file] [log] [blame]
caryclark@google.comafcb55c2011-12-14 17:12:04 +00001# Port-specific Skia library code.
2{
caryclark@google.comafcb55c2011-12-14 17:12:04 +00003 'targets': [
4 {
5 'target_name': 'ports',
borenet@google.comefb1d772012-10-10 19:45:51 +00006 'product_name': 'skia_ports',
caryclark@google.comafcb55c2011-12-14 17:12:04 +00007 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +00008 'standalone_static_library': 1,
bungeman@google.coma02bc152012-05-16 18:21:56 +00009 'dependencies': [
10 'core.gyp:core',
11 'sfnt.gyp:sfnt',
12 'utils.gyp:utils',
13 ],
caryclark@google.comafcb55c2011-12-14 17:12:04 +000014 'include_dirs': [
bungeman@google.com5a64e582012-03-29 14:51:56 +000015 '../include/images',
16 '../include/effects',
bungeman@google.com29b63dc2012-03-29 14:28:59 +000017 '../include/ports',
bungeman@google.com5a64e582012-03-29 14:51:56 +000018 '../include/xml',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000019 '../src/core',
bungeman@google.coma02bc152012-05-16 18:21:56 +000020 '../src/utils',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000021 ],
22 'sources': [
borenet@google.com7158e6a2012-11-01 17:43:44 +000023 '../src/ports/SkDebug_nacl.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000024 '../src/ports/SkDebug_stdio.cpp',
25 '../src/ports/SkDebug_win.cpp',
djsollen@google.com97145162012-05-31 19:55:08 +000026 '../src/ports/SkFontDescriptor.h',
27 '../src/ports/SkFontDescriptor.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000028 '../src/ports/SkFontHost_sandbox_none.cpp',
29 '../src/ports/SkFontHost_win.cpp',
bungeman@google.come8f05922012-08-16 16:13:40 +000030 '../src/ports/SkFontHost_win_dw.cpp',
caryclark@google.comd26147a2011-12-15 14:16:43 +000031 '../src/ports/SkGlobalInitialization_default.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000032 '../src/ports/SkThread_win.cpp',
33
34 '../src/ports/SkFontHost_tables.cpp',
35 '../src/ports/SkMemory_malloc.cpp',
36 '../src/ports/SkOSFile_stdio.cpp',
37 '../src/ports/SkTime_Unix.cpp',
38 '../src/ports/SkTime_win.cpp',
39 '../src/ports/SkXMLParser_empty.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000040 ],
41 'conditions': [
42 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
borenet@google.com7158e6a2012-11-01 17:43:44 +000043 'defines': [
44 #The font host requires at least FreeType 2.3.0 at runtime.
45 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020300',\
46 'SK_CAN_USE_DLOPEN=1',
47 ],
48 'link_settings': {
49 'libraries': [
50 '-lfreetype',
51 '-ldl',
52 ],
53 },
54 'sources': [
55 '../src/ports/SkFontHost_FreeType.cpp',
56 '../src/ports/SkFontHost_FreeType_common.cpp',
57 '../src/ports/SkFontHost_linux.cpp',
58 '../src/ports/SkThread_pthread.cpp',
59 ],
60 }],
61 [ 'skia_os == "nacl"', {
62 'dependencies': [
63 # On other OS, we can dynamically link against freetype. For nacl,
64 # we have to include our own version since the naclports version is
65 # too old (<0x020300) to provide the functionality we need.
66 'freetype.gyp:freetype',
67 ],
68 'export_dependent_settings': [
69 'freetype.gyp:freetype',
70 ],
71 'defines': [
72 # We use Android's repo, which provides at least FreeType 2.4.0
73 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020400',\
bungeman@google.comfd668cf2012-08-24 17:46:11 +000074 ],
caryclark@google.comafcb55c2011-12-14 17:12:04 +000075 'sources': [
borenet@google.com7158e6a2012-11-01 17:43:44 +000076 '../src/ports/SkFontHost_FreeType.cpp',
77 '../src/ports/SkFontHost_FreeType_common.cpp',
78 '../src/ports/SkFontHost_linux.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000079 '../src/ports/SkThread_pthread.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000080 ],
borenet@google.com7158e6a2012-11-01 17:43:44 +000081 'sources!': [
82 '../src/ports/SkDebug_stdio.cpp',
83 ],
84 }, {
85 'sources!': [
86 '../src/ports/SkDebug_nacl.cpp',
87 ],
caryclark@google.comafcb55c2011-12-14 17:12:04 +000088 }],
89 [ 'skia_os == "mac"', {
90 'include_dirs': [
91 '../include/utils/mac',
92 '../third_party/freetype/include/**',
93 ],
94 'sources': [
95 '../src/ports/SkFontHost_mac_coretext.cpp',
reed@google.com61c22042012-02-24 15:29:00 +000096 '../src/utils/mac/SkStream_mac.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000097# '../src/ports/SkFontHost_FreeType.cpp',
george@mozilla.comc59b5da2012-08-23 00:39:08 +000098# '../src/ports/SkFontHost_FreeType_common.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +000099# '../src/ports/SkFontHost_freetype_mac.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000100 '../src/ports/SkThread_pthread.cpp',
101 ],
reed@google.com17aa07d2012-02-23 14:51:10 +0000102 'sources!': [
103 '../src/ports/SkFontHost_tables.cpp',
104 ],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000105 }],
106 [ 'skia_os == "ios"', {
107 'include_dirs': [
108 '../include/utils/ios',
caryclark@google.com35f5ac92012-09-18 15:41:18 +0000109 '../include/utils/mac',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000110 ],
111 'sources': [
112 '../src/ports/SkFontHost_mac_coretext.cpp',
caryclark@google.com867cbd82012-09-20 15:45:41 +0000113 '../src/utils/mac/SkStream_mac.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000114 '../src/ports/SkThread_pthread.cpp',
115 ],
caryclark@google.com867cbd82012-09-20 15:45:41 +0000116 'sources!': [
117 '../src/ports/SkFontHost_tables.cpp',
118 ],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000119 }],
120 [ 'skia_os == "win"', {
121 'include_dirs': [
122 'config/win',
bungeman@google.come8f05922012-08-16 16:13:40 +0000123 '../src/utils/win',
124 ],
125 'conditions': [
126 [ 'skia_directwrite', {
127 'sources!': [
128 '../src/ports/SkFontHost_win.cpp',
129 ],
130 }, { # else !skia_directwrite
131 'sources!': [
132 '../src/ports/SkFontHost_win_dw.cpp',
133 ],
134 }],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000135 ],
136 'sources!': [ # these are used everywhere but windows
137 '../src/ports/SkDebug_stdio.cpp',
138 '../src/ports/SkTime_Unix.cpp',
139 ],
140 }, { # else !win
141 'sources!': [
142 '../src/ports/SkDebug_win.cpp',
143 '../src/ports/SkFontHost_win.cpp',
bungeman@google.com6ca0a5d2012-08-16 16:23:09 +0000144 '../src/ports/SkFontHost_win_dw.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000145 '../src/ports/SkThread_win.cpp',
146 '../src/ports/SkTime_win.cpp',
147 ],
148 }],
149 [ 'skia_os == "android"', {
bungeman@google.comfd668cf2012-08-24 17:46:11 +0000150 'defines': [
151 #Android provides at least FreeType 2.4.0 at runtime.
152 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020400',
153 #Skia should not use dlopen on Android.
154 'SK_CAN_USE_DLOPEN=0',
155 ],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000156 'sources!': [
157 '../src/ports/SkDebug_stdio.cpp',
158 ],
159 'sources': [
160 '../src/ports/SkDebug_android.cpp',
161 '../src/ports/SkThread_pthread.cpp',
162 '../src/ports/SkFontHost_android.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000163 '../src/ports/SkFontHost_FreeType.cpp',
george@mozilla.comc59b5da2012-08-23 00:39:08 +0000164 '../src/ports/SkFontHost_FreeType_common.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000165 '../src/ports/FontHostConfiguration_android.cpp',
djsollen@google.com276a2952012-11-19 19:34:23 +0000166 '../src/ports/SkImageRef_ashmem.cpp',
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000167 ],
djsollen@google.com62b24b12011-12-15 16:16:22 +0000168 'dependencies': [
borenet@google.com7158e6a2012-11-01 17:43:44 +0000169 'freetype.gyp:freetype',
borenet@google.comaf730912012-08-09 15:54:28 +0000170 'android_deps.gyp:expat',
djsollen@google.com62b24b12011-12-15 16:16:22 +0000171 ],
rmistry@google.comd6176b02012-08-23 18:14:13 +0000172 }],
caryclark@google.comafcb55c2011-12-14 17:12:04 +0000173 ],
174 'direct_dependent_settings': {
175 'include_dirs': [
176 '../include/ports',
177 ],
178 },
179 },
180 ],
181}
182
183# Local Variables:
184# tab-width:2
185# indent-tabs-mode:nil
186# End:
187# vim: set expandtab tabstop=2 shiftwidth=2: