scroggo | 3e56227 | 2015-03-25 10:22:41 -0700 | [diff] [blame] | 1 | # 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.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 5 | # Port-specific Skia library code. |
| 6 | { |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 7 | 'targets': [ |
| 8 | { |
| 9 | 'target_name': 'ports', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 10 | 'product_name': 'skia_ports', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 11 | 'type': 'static_library', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 12 | 'standalone_static_library': 1, |
bungeman@google.com | b8f3655 | 2013-07-22 14:39:45 +0000 | [diff] [blame] | 13 | 'dependencies': [ |
| 14 | 'core.gyp:*', |
| 15 | ], |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 16 | 'include_dirs': [ |
bungeman@google.com | 5a64e58 | 2012-03-29 14:51:56 +0000 | [diff] [blame] | 17 | '../include/effects', |
robertphillips | 188d44c | 2016-02-01 04:54:14 -0800 | [diff] [blame] | 18 | '../include/client/android', |
scroggo@google.com | d9ef3a2 | 2013-03-15 18:08:09 +0000 | [diff] [blame] | 19 | '../include/images', |
bungeman@google.com | 29b63dc | 2012-03-29 14:28:59 +0000 | [diff] [blame] | 20 | '../include/ports', |
mtklein | cd1f2da | 2015-07-28 08:55:14 -0700 | [diff] [blame] | 21 | '../include/private', |
djsollen@google.com | 52f0297 | 2013-06-03 12:10:19 +0000 | [diff] [blame] | 22 | '../include/utils', |
djsollen@google.com | 2897931 | 2013-06-03 14:44:52 +0000 | [diff] [blame] | 23 | '../include/utils/win', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 24 | '../src/core', |
halcanary | ba923d3 | 2015-12-07 12:02:33 -0800 | [diff] [blame] | 25 | '../src/image', |
scroggo@google.com | d9ef3a2 | 2013-03-15 18:08:09 +0000 | [diff] [blame] | 26 | '../src/lazy', |
reed@google.com | e027a6e | 2013-07-31 17:37:31 +0000 | [diff] [blame] | 27 | '../src/ports', |
djsollen@google.com | 52f0297 | 2013-06-03 12:10:19 +0000 | [diff] [blame] | 28 | '../src/sfnt', |
bungeman@google.com | a02bc15 | 2012-05-16 18:21:56 +0000 | [diff] [blame] | 29 | '../src/utils', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 30 | ], |
| 31 | 'sources': [ |
| 32 | '../src/ports/SkDebug_stdio.cpp', |
| 33 | '../src/ports/SkDebug_win.cpp', |
bungeman@google.com | bfc6cc4 | 2013-08-21 15:20:43 +0000 | [diff] [blame] | 34 | |
bungeman@google.com | 72cf4fc | 2014-03-21 22:48:32 +0000 | [diff] [blame] | 35 | '../src/fonts/SkFontMgr_indirect.cpp', |
| 36 | '../src/fonts/SkRemotableFontMgr.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 37 | '../src/ports/SkFontHost_win.cpp', |
bungeman | 77f85ad | 2015-06-17 12:07:10 -0700 | [diff] [blame] | 38 | '../src/ports/SkFontMgr_android_factory.cpp', |
bungeman | 5cf1949 | 2015-06-15 15:17:21 -0700 | [diff] [blame] | 39 | '../src/ports/SkFontMgr_custom_directory_factory.cpp', |
| 40 | '../src/ports/SkFontMgr_custom_embedded_factory.cpp', |
bungeman | 0b1de26 | 2015-06-17 07:55:59 -0700 | [diff] [blame] | 41 | '../src/ports/SkFontMgr_fontconfig_factory.cpp', |
bungeman | 51daa25 | 2014-06-05 13:38:45 -0700 | [diff] [blame] | 42 | '../src/ports/SkFontMgr_win_dw.cpp', |
bungeman | 5cf1949 | 2015-06-15 15:17:21 -0700 | [diff] [blame] | 43 | '../src/ports/SkFontMgr_win_dw_factory.cpp', |
| 44 | '../src/ports/SkFontMgr_win_gdi_factory.cpp', |
bungeman@google.com | 72cf4fc | 2014-03-21 22:48:32 +0000 | [diff] [blame] | 45 | '../src/ports/SkRemotableFontMgr_win_dw.cpp', |
Ben Wagner | 98875e1 | 2014-06-05 16:55:58 -0400 | [diff] [blame] | 46 | '../src/ports/SkScalerContext_win_dw.cpp', |
bungeman | 51daa25 | 2014-06-05 13:38:45 -0700 | [diff] [blame] | 47 | '../src/ports/SkScalerContext_win_dw.h', |
| 48 | '../src/ports/SkTypeface_win_dw.cpp', |
| 49 | '../src/ports/SkTypeface_win_dw.h', |
bungeman@google.com | bfc6cc4 | 2013-08-21 15:20:43 +0000 | [diff] [blame] | 50 | |
caryclark@google.com | d26147a | 2011-12-15 14:16:43 +0000 | [diff] [blame] | 51 | '../src/ports/SkGlobalInitialization_default.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 52 | '../src/ports/SkMemory_malloc.cpp', |
kkinnunen | dd180e7 | 2015-12-21 04:05:53 -0800 | [diff] [blame] | 53 | '../src/ports/SkOSEnvironment.h', |
| 54 | '../src/ports/SkOSEnvironment.cpp', |
bungeman@google.com | 6cab1a4 | 2013-05-29 13:43:31 +0000 | [diff] [blame] | 55 | '../src/ports/SkOSFile_posix.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 56 | '../src/ports/SkOSFile_stdio.cpp', |
bungeman@google.com | 6cab1a4 | 2013-05-29 13:43:31 +0000 | [diff] [blame] | 57 | '../src/ports/SkOSFile_win.cpp', |
hendrikw | b1ac52f | 2015-10-01 18:29:34 -0700 | [diff] [blame] | 58 | '../src/ports/SkOSLibrary.h', |
| 59 | '../src/ports/SkOSLibrary_posix.cpp', |
| 60 | '../src/ports/SkOSLibrary_win.cpp', |
scroggo@google.com | 8b71ef1 | 2013-08-19 18:38:08 +0000 | [diff] [blame] | 61 | '../src/ports/SkDiscardableMemory_none.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 62 | '../src/ports/SkTime_Unix.cpp', |
| 63 | '../src/ports/SkTime_win.cpp', |
bungeman@google.com | f2e7dbb | 2013-07-16 14:59:24 +0000 | [diff] [blame] | 64 | '../src/ports/SkTLS_pthread.cpp', |
| 65 | '../src/ports/SkTLS_win.cpp', |
bungeman@google.com | 72cf4fc | 2014-03-21 22:48:32 +0000 | [diff] [blame] | 66 | |
| 67 | '../include/ports/SkFontConfigInterface.h', |
| 68 | '../include/ports/SkFontMgr.h', |
bungeman | 77f85ad | 2015-06-17 12:07:10 -0700 | [diff] [blame] | 69 | '../include/ports/SkFontMgr_android.h', |
bungeman | 0b1de26 | 2015-06-17 07:55:59 -0700 | [diff] [blame] | 70 | '../include/ports/SkFontMgr_custom.h', |
| 71 | '../include/ports/SkFontMgr_fontconfig.h', |
bungeman@google.com | 72cf4fc | 2014-03-21 22:48:32 +0000 | [diff] [blame] | 72 | '../include/ports/SkFontMgr_indirect.h', |
bungeman@google.com | 72cf4fc | 2014-03-21 22:48:32 +0000 | [diff] [blame] | 73 | '../include/ports/SkRemotableFontMgr.h', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 74 | ], |
bungeman | 5cf1949 | 2015-06-15 15:17:21 -0700 | [diff] [blame] | 75 | 'sources/': [ |
| 76 | ['exclude', 'SkFontMgr_.+_factory\\.cpp$'], |
| 77 | ], |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 78 | 'conditions': [ |
borenet | 4808757 | 2015-04-02 12:16:36 -0700 | [diff] [blame] | 79 | [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos", "android"]', { |
djsollen@google.com | 2679ff8 | 2013-07-22 14:12:56 +0000 | [diff] [blame] | 80 | 'sources': [ |
| 81 | '../src/ports/SkFontHost_FreeType.cpp', |
| 82 | '../src/ports/SkFontHost_FreeType_common.cpp', |
bungeman | 786ece1 | 2015-07-15 10:58:47 -0700 | [diff] [blame] | 83 | '../src/ports/SkFontMgr_android.cpp', |
| 84 | '../src/ports/SkFontMgr_android_parser.cpp', |
| 85 | '../src/ports/SkFontMgr_custom.cpp', |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 86 | ], |
djsollen@google.com | 2679ff8 | 2013-07-22 14:12:56 +0000 | [diff] [blame] | 87 | 'dependencies': [ |
| 88 | 'freetype.gyp:freetype', |
| 89 | ], |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 90 | 'conditions': [ |
bungeman | 786ece1 | 2015-07-15 10:58:47 -0700 | [diff] [blame] | 91 | [ 'skia_os == "android"', { |
| 92 | 'dependencies': [ |
| 93 | 'android_deps.gyp:expat', |
| 94 | ], |
| 95 | }, { |
bungeman | 5c9fa28 | 2015-03-30 12:53:48 -0700 | [diff] [blame] | 96 | 'link_settings': { |
| 97 | 'libraries': [ |
| 98 | '-ldl', |
bungeman | 786ece1 | 2015-07-15 10:58:47 -0700 | [diff] [blame] | 99 | '-lexpat', |
bungeman | 5c9fa28 | 2015-03-30 12:53:48 -0700 | [diff] [blame] | 100 | ], |
| 101 | }, |
bungeman | 786ece1 | 2015-07-15 10:58:47 -0700 | [diff] [blame] | 102 | }], |
| 103 | [ 'skia_embedded_fonts', { |
bungeman | 5c9fa28 | 2015-03-30 12:53:48 -0700 | [diff] [blame] | 104 | 'variables': { |
| 105 | 'embedded_font_data_identifier': 'sk_fonts', |
| 106 | 'fonts_to_include': [ |
bungeman | 3ffa126 | 2015-04-30 17:12:58 -0400 | [diff] [blame] | 107 | '../resources/fonts/Funkster.ttf', |
bungeman | 5c9fa28 | 2015-03-30 12:53:48 -0700 | [diff] [blame] | 108 | ], |
| 109 | }, |
bungeman | 5cf1949 | 2015-06-15 15:17:21 -0700 | [diff] [blame] | 110 | 'sources/': [['include', '../src/ports/SkFontMgr_custom_embedded_factory.cpp']], |
bungeman | 5c9fa28 | 2015-03-30 12:53:48 -0700 | [diff] [blame] | 111 | 'actions': [{ |
| 112 | 'action_name': 'generate_embedded_font_data', |
| 113 | 'inputs': [ |
| 114 | '../tools/embed_resources.py', |
| 115 | '<@(fonts_to_include)', |
| 116 | ], |
| 117 | 'outputs': [ |
| 118 | '<(SHARED_INTERMEDIATE_DIR)/ports/fonts/fonts.cpp', |
| 119 | ], |
| 120 | 'action': ['python', '../tools/embed_resources.py', |
| 121 | '--align', '4', |
| 122 | '--name', '<(embedded_font_data_identifier)', |
| 123 | '--input', '<@(fonts_to_include)', |
| 124 | '--output', '<@(_outputs)', |
| 125 | ], |
| 126 | 'message': 'Generating <@(_outputs)', |
| 127 | 'process_outputs_as_sources': 1, |
| 128 | }], |
| 129 | 'defines': [ |
| 130 | 'SK_EMBEDDED_FONTS=<(embedded_font_data_identifier)', |
| 131 | ], |
| 132 | }, 'skia_no_fontconfig', { |
bungeman | 5cf1949 | 2015-06-15 15:17:21 -0700 | [diff] [blame] | 133 | 'sources/': [['include', '../src/ports/SkFontMgr_custom_directory_factory.cpp']], |
bungeman | 786ece1 | 2015-07-15 10:58:47 -0700 | [diff] [blame] | 134 | }, 'skia_os == "android"', { |
| 135 | 'sources/': [['include', '../src/ports/SkFontMgr_android_factory.cpp']], |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 136 | }, { |
| 137 | 'link_settings': { |
| 138 | 'libraries': [ |
| 139 | '-lfontconfig', |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 140 | ], |
| 141 | }, |
| 142 | 'sources': [ |
bungeman | a6785cc | 2014-08-25 12:00:49 -0700 | [diff] [blame] | 143 | '../src/ports/SkFontMgr_fontconfig.cpp', |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 144 | '../src/ports/SkFontHost_fontconfig.cpp', |
| 145 | '../src/ports/SkFontConfigInterface_direct.cpp', |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 146 | '../src/ports/SkFontConfigInterface_direct_factory.cpp', |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 147 | ], |
bungeman | 0b1de26 | 2015-06-17 07:55:59 -0700 | [diff] [blame] | 148 | 'sources/': [['include', '../src/ports/SkFontMgr_fontconfig_factory.cpp']], |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 149 | }] |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 150 | ], |
| 151 | }], |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 152 | [ 'skia_os == "mac"', { |
| 153 | 'include_dirs': [ |
| 154 | '../include/utils/mac', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 155 | ], |
| 156 | 'sources': [ |
mike@reedtribe.org | b103ed4 | 2013-03-03 03:50:09 +0000 | [diff] [blame] | 157 | '../src/ports/SkFontHost_mac.cpp', |
scroggo@google.com | d9ef3a2 | 2013-03-15 18:08:09 +0000 | [diff] [blame] | 158 | '../src/utils/mac/SkStream_mac.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 159 | ], |
| 160 | }], |
| 161 | [ 'skia_os == "ios"', { |
| 162 | 'include_dirs': [ |
| 163 | '../include/utils/ios', |
caryclark@google.com | 35f5ac9 | 2012-09-18 15:41:18 +0000 | [diff] [blame] | 164 | '../include/utils/mac', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 165 | ], |
| 166 | 'sources': [ |
mike@reedtribe.org | b103ed4 | 2013-03-03 03:50:09 +0000 | [diff] [blame] | 167 | '../src/ports/SkFontHost_mac.cpp', |
scroggo@google.com | d9ef3a2 | 2013-03-15 18:08:09 +0000 | [diff] [blame] | 168 | '../src/utils/mac/SkStream_mac.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 169 | ], |
| 170 | }], |
| 171 | [ 'skia_os == "win"', { |
| 172 | 'include_dirs': [ |
| 173 | 'config/win', |
bungeman@google.com | e8f0592 | 2012-08-16 16:13:40 +0000 | [diff] [blame] | 174 | '../src/utils/win', |
| 175 | ], |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 176 | 'sources!': [ # these are used everywhere but windows |
| 177 | '../src/ports/SkDebug_stdio.cpp', |
bungeman@google.com | 6cab1a4 | 2013-05-29 13:43:31 +0000 | [diff] [blame] | 178 | '../src/ports/SkOSFile_posix.cpp', |
hendrikw | b1ac52f | 2015-10-01 18:29:34 -0700 | [diff] [blame] | 179 | '../src/ports/SkOSLibrary_posix.cpp', |
bungeman@google.com | f2e7dbb | 2013-07-16 14:59:24 +0000 | [diff] [blame] | 180 | '../src/ports/SkTime_Unix.cpp', |
| 181 | '../src/ports/SkTLS_pthread.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 182 | ], |
bungeman@google.com | bfc6cc4 | 2013-08-21 15:20:43 +0000 | [diff] [blame] | 183 | 'conditions': [ |
| 184 | # when we build for win, we only want one of these default files |
Mike Klein | 9358706 | 2014-07-16 13:06:04 -0400 | [diff] [blame] | 185 | [ 'skia_gdi', { |
bungeman | 5cf1949 | 2015-06-15 15:17:21 -0700 | [diff] [blame] | 186 | 'sources/': [['include', '../src/ports/SkFontMgr_win_gdi_factory.cpp']], |
Mike Klein | 9358706 | 2014-07-16 13:06:04 -0400 | [diff] [blame] | 187 | }, { # normally default to direct write |
bungeman | 5cf1949 | 2015-06-15 15:17:21 -0700 | [diff] [blame] | 188 | 'sources/': [['include', '../src/ports/SkFontMgr_win_dw_factory.cpp']], |
bungeman@google.com | bfc6cc4 | 2013-08-21 15:20:43 +0000 | [diff] [blame] | 189 | }], |
| 190 | ], |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 191 | }, { # else !win |
| 192 | 'sources!': [ |
| 193 | '../src/ports/SkDebug_win.cpp', |
| 194 | '../src/ports/SkFontHost_win.cpp', |
bungeman | 51daa25 | 2014-06-05 13:38:45 -0700 | [diff] [blame] | 195 | '../src/ports/SkFontMgr_win_dw.cpp', |
bungeman@google.com | 6cab1a4 | 2013-05-29 13:43:31 +0000 | [diff] [blame] | 196 | '../src/ports/SkOSFile_win.cpp', |
hendrikw | b1ac52f | 2015-10-01 18:29:34 -0700 | [diff] [blame] | 197 | '../src/ports/SkOSLibrary_win.cpp', |
bungeman@google.com | 04c32a8 | 2014-03-21 23:19:10 +0000 | [diff] [blame] | 198 | '../src/ports/SkRemotableFontMgr_win_dw.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 199 | '../src/ports/SkTime_win.cpp', |
bungeman@google.com | f2e7dbb | 2013-07-16 14:59:24 +0000 | [diff] [blame] | 200 | '../src/ports/SkTLS_win.cpp', |
Ben Wagner | 98875e1 | 2014-06-05 16:55:58 -0400 | [diff] [blame] | 201 | '../src/ports/SkScalerContext_win_dw.cpp', |
bungeman | 51daa25 | 2014-06-05 13:38:45 -0700 | [diff] [blame] | 202 | '../src/ports/SkScalerContext_win_dw.h', |
| 203 | '../src/ports/SkTypeface_win_dw.cpp', |
| 204 | '../src/ports/SkTypeface_win_dw.h', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 205 | ], |
| 206 | }], |
| 207 | [ 'skia_os == "android"', { |
| 208 | 'sources!': [ |
| 209 | '../src/ports/SkDebug_stdio.cpp', |
| 210 | ], |
| 211 | 'sources': [ |
| 212 | '../src/ports/SkDebug_android.cpp', |
djsollen@google.com | 62b24b1 | 2011-12-15 16:16:22 +0000 | [diff] [blame] | 213 | ], |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 214 | }], |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 215 | ], |
| 216 | 'direct_dependent_settings': { |
| 217 | 'include_dirs': [ |
| 218 | '../include/ports', |
| 219 | ], |
| 220 | }, |
| 221 | }, |
| 222 | ], |
| 223 | } |