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', |
scroggo@google.com | d9ef3a2 | 2013-03-15 18:08:09 +0000 | [diff] [blame] | 18 | '../include/images', |
bungeman@google.com | 29b63dc | 2012-03-29 14:28:59 +0000 | [diff] [blame] | 19 | '../include/ports', |
djsollen@google.com | 52f0297 | 2013-06-03 12:10:19 +0000 | [diff] [blame] | 20 | '../include/utils', |
djsollen@google.com | 2897931 | 2013-06-03 14:44:52 +0000 | [diff] [blame] | 21 | '../include/utils/win', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 22 | '../src/core', |
scroggo@google.com | d9ef3a2 | 2013-03-15 18:08:09 +0000 | [diff] [blame] | 23 | '../src/lazy', |
reed@google.com | e027a6e | 2013-07-31 17:37:31 +0000 | [diff] [blame] | 24 | '../src/ports', |
djsollen@google.com | 52f0297 | 2013-06-03 12:10:19 +0000 | [diff] [blame] | 25 | '../src/sfnt', |
bungeman@google.com | a02bc15 | 2012-05-16 18:21:56 +0000 | [diff] [blame] | 26 | '../src/utils', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 27 | ], |
| 28 | 'sources': [ |
| 29 | '../src/ports/SkDebug_stdio.cpp', |
| 30 | '../src/ports/SkDebug_win.cpp', |
bungeman@google.com | bfc6cc4 | 2013-08-21 15:20:43 +0000 | [diff] [blame] | 31 | |
bungeman@google.com | 72cf4fc | 2014-03-21 22:48:32 +0000 | [diff] [blame] | 32 | '../src/fonts/SkFontMgr_indirect.cpp', |
| 33 | '../src/fonts/SkRemotableFontMgr.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 34 | '../src/ports/SkFontHost_win.cpp', |
bungeman@google.com | bfc6cc4 | 2013-08-21 15:20:43 +0000 | [diff] [blame] | 35 | '../src/ports/SkFontMgr_default_gdi.cpp', |
| 36 | '../src/ports/SkFontMgr_default_dw.cpp', |
bungeman | 51daa25 | 2014-06-05 13:38:45 -0700 | [diff] [blame] | 37 | '../src/ports/SkFontMgr_win_dw.cpp', |
bungeman@google.com | 72cf4fc | 2014-03-21 22:48:32 +0000 | [diff] [blame] | 38 | '../src/ports/SkRemotableFontMgr_win_dw.cpp', |
Ben Wagner | 98875e1 | 2014-06-05 16:55:58 -0400 | [diff] [blame] | 39 | '../src/ports/SkScalerContext_win_dw.cpp', |
bungeman | 51daa25 | 2014-06-05 13:38:45 -0700 | [diff] [blame] | 40 | '../src/ports/SkScalerContext_win_dw.h', |
| 41 | '../src/ports/SkTypeface_win_dw.cpp', |
| 42 | '../src/ports/SkTypeface_win_dw.h', |
bungeman@google.com | bfc6cc4 | 2013-08-21 15:20:43 +0000 | [diff] [blame] | 43 | |
caryclark@google.com | d26147a | 2011-12-15 14:16:43 +0000 | [diff] [blame] | 44 | '../src/ports/SkGlobalInitialization_default.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 45 | '../src/ports/SkMemory_malloc.cpp', |
bungeman@google.com | 6cab1a4 | 2013-05-29 13:43:31 +0000 | [diff] [blame] | 46 | '../src/ports/SkOSFile_posix.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 47 | '../src/ports/SkOSFile_stdio.cpp', |
bungeman@google.com | 6cab1a4 | 2013-05-29 13:43:31 +0000 | [diff] [blame] | 48 | '../src/ports/SkOSFile_win.cpp', |
scroggo@google.com | 8b71ef1 | 2013-08-19 18:38:08 +0000 | [diff] [blame] | 49 | '../src/ports/SkDiscardableMemory_none.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 50 | '../src/ports/SkTime_Unix.cpp', |
| 51 | '../src/ports/SkTime_win.cpp', |
bungeman@google.com | f2e7dbb | 2013-07-16 14:59:24 +0000 | [diff] [blame] | 52 | '../src/ports/SkTLS_pthread.cpp', |
| 53 | '../src/ports/SkTLS_win.cpp', |
bungeman@google.com | 72cf4fc | 2014-03-21 22:48:32 +0000 | [diff] [blame] | 54 | |
| 55 | '../include/ports/SkFontConfigInterface.h', |
| 56 | '../include/ports/SkFontMgr.h', |
| 57 | '../include/ports/SkFontMgr_indirect.h', |
bungeman@google.com | 72cf4fc | 2014-03-21 22:48:32 +0000 | [diff] [blame] | 58 | '../include/ports/SkRemotableFontMgr.h', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 59 | ], |
| 60 | 'conditions': [ |
borenet | 4808757 | 2015-04-02 12:16:36 -0700 | [diff] [blame] | 61 | [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos", "android"]', { |
djsollen@google.com | 2679ff8 | 2013-07-22 14:12:56 +0000 | [diff] [blame] | 62 | 'sources': [ |
| 63 | '../src/ports/SkFontHost_FreeType.cpp', |
| 64 | '../src/ports/SkFontHost_FreeType_common.cpp', |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 65 | ], |
djsollen@google.com | 2679ff8 | 2013-07-22 14:12:56 +0000 | [diff] [blame] | 66 | 'dependencies': [ |
| 67 | 'freetype.gyp:freetype', |
| 68 | ], |
| 69 | }], |
| 70 | [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', { |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 71 | 'conditions': [ |
bungeman | 5c9fa28 | 2015-03-30 12:53:48 -0700 | [diff] [blame] | 72 | [ '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': [ |
bungeman | 3ffa126 | 2015-04-30 17:12:58 -0400 | [diff] [blame] | 81 | '../resources/fonts/Funkster.ttf', |
bungeman | 5c9fa28 | 2015-03-30 12:53:48 -0700 | [diff] [blame] | 82 | ], |
| 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.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 109 | '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': [ |
bungeman | a6785cc | 2014-08-25 12:00:49 -0700 | [diff] [blame] | 125 | '../src/ports/SkFontMgr_fontconfig.cpp', |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 126 | '../src/ports/SkFontHost_fontconfig.cpp', |
| 127 | '../src/ports/SkFontConfigInterface_direct.cpp', |
| 128 | ], |
| 129 | }] |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 130 | ], |
| 131 | }], |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 132 | [ 'skia_os == "mac"', { |
| 133 | 'include_dirs': [ |
| 134 | '../include/utils/mac', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 135 | ], |
| 136 | 'sources': [ |
mike@reedtribe.org | b103ed4 | 2013-03-03 03:50:09 +0000 | [diff] [blame] | 137 | '../src/ports/SkFontHost_mac.cpp', |
scroggo@google.com | d9ef3a2 | 2013-03-15 18:08:09 +0000 | [diff] [blame] | 138 | '../src/utils/mac/SkStream_mac.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 139 | ], |
reed@google.com | 17aa07d | 2012-02-23 14:51:10 +0000 | [diff] [blame] | 140 | 'sources!': [ |
| 141 | '../src/ports/SkFontHost_tables.cpp', |
| 142 | ], |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 143 | }], |
| 144 | [ 'skia_os == "ios"', { |
| 145 | 'include_dirs': [ |
| 146 | '../include/utils/ios', |
caryclark@google.com | 35f5ac9 | 2012-09-18 15:41:18 +0000 | [diff] [blame] | 147 | '../include/utils/mac', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 148 | ], |
| 149 | 'sources': [ |
mike@reedtribe.org | b103ed4 | 2013-03-03 03:50:09 +0000 | [diff] [blame] | 150 | '../src/ports/SkFontHost_mac.cpp', |
scroggo@google.com | d9ef3a2 | 2013-03-15 18:08:09 +0000 | [diff] [blame] | 151 | '../src/utils/mac/SkStream_mac.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 152 | ], |
caryclark@google.com | 867cbd8 | 2012-09-20 15:45:41 +0000 | [diff] [blame] | 153 | 'sources!': [ |
| 154 | '../src/ports/SkFontHost_tables.cpp', |
| 155 | ], |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 156 | }], |
| 157 | [ 'skia_os == "win"', { |
| 158 | 'include_dirs': [ |
| 159 | 'config/win', |
bungeman@google.com | e8f0592 | 2012-08-16 16:13:40 +0000 | [diff] [blame] | 160 | '../src/utils/win', |
| 161 | ], |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 162 | 'sources!': [ # these are used everywhere but windows |
| 163 | '../src/ports/SkDebug_stdio.cpp', |
bungeman@google.com | 6cab1a4 | 2013-05-29 13:43:31 +0000 | [diff] [blame] | 164 | '../src/ports/SkOSFile_posix.cpp', |
bungeman@google.com | f2e7dbb | 2013-07-16 14:59:24 +0000 | [diff] [blame] | 165 | '../src/ports/SkTime_Unix.cpp', |
| 166 | '../src/ports/SkTLS_pthread.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 167 | ], |
bungeman@google.com | bfc6cc4 | 2013-08-21 15:20:43 +0000 | [diff] [blame] | 168 | 'conditions': [ |
| 169 | # 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] | 170 | [ 'skia_gdi', { |
bungeman@google.com | bfc6cc4 | 2013-08-21 15:20:43 +0000 | [diff] [blame] | 171 | 'sources!': [ |
| 172 | '../src/ports/SkFontMgr_default_dw.cpp', |
| 173 | ], |
Mike Klein | 9358706 | 2014-07-16 13:06:04 -0400 | [diff] [blame] | 174 | }, { # normally default to direct write |
| 175 | 'sources!': [ |
| 176 | '../src/ports/SkFontMgr_default_gdi.cpp', |
| 177 | ], |
bungeman@google.com | bfc6cc4 | 2013-08-21 15:20:43 +0000 | [diff] [blame] | 178 | }], |
| 179 | ], |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 180 | }, { # else !win |
| 181 | 'sources!': [ |
| 182 | '../src/ports/SkDebug_win.cpp', |
| 183 | '../src/ports/SkFontHost_win.cpp', |
bungeman@google.com | bfc6cc4 | 2013-08-21 15:20:43 +0000 | [diff] [blame] | 184 | '../src/ports/SkFontMgr_default_gdi.cpp', |
| 185 | '../src/ports/SkFontMgr_default_dw.cpp', |
bungeman | 51daa25 | 2014-06-05 13:38:45 -0700 | [diff] [blame] | 186 | '../src/ports/SkFontMgr_win_dw.cpp', |
bungeman@google.com | 6cab1a4 | 2013-05-29 13:43:31 +0000 | [diff] [blame] | 187 | '../src/ports/SkOSFile_win.cpp', |
bungeman@google.com | 04c32a8 | 2014-03-21 23:19:10 +0000 | [diff] [blame] | 188 | '../src/ports/SkRemotableFontMgr_win_dw.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 189 | '../src/ports/SkTime_win.cpp', |
bungeman@google.com | f2e7dbb | 2013-07-16 14:59:24 +0000 | [diff] [blame] | 190 | '../src/ports/SkTLS_win.cpp', |
Ben Wagner | 98875e1 | 2014-06-05 16:55:58 -0400 | [diff] [blame] | 191 | '../src/ports/SkScalerContext_win_dw.cpp', |
bungeman | 51daa25 | 2014-06-05 13:38:45 -0700 | [diff] [blame] | 192 | '../src/ports/SkScalerContext_win_dw.h', |
| 193 | '../src/ports/SkTypeface_win_dw.cpp', |
| 194 | '../src/ports/SkTypeface_win_dw.h', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 195 | ], |
| 196 | }], |
| 197 | [ 'skia_os == "android"', { |
| 198 | 'sources!': [ |
| 199 | '../src/ports/SkDebug_stdio.cpp', |
| 200 | ], |
| 201 | 'sources': [ |
| 202 | '../src/ports/SkDebug_android.cpp', |
djsollen@google.com | bfae9d3 | 2013-05-21 16:53:50 +0000 | [diff] [blame] | 203 | '../src/ports/SkFontConfigParser_android.cpp', |
bungeman | 8d84c99 | 2014-07-24 08:05:09 -0700 | [diff] [blame] | 204 | '../src/ports/SkFontMgr_android.cpp', |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 205 | ], |
djsollen@google.com | 62b24b1 | 2011-12-15 16:16:22 +0000 | [diff] [blame] | 206 | 'dependencies': [ |
borenet@google.com | af73091 | 2012-08-09 15:54:28 +0000 | [diff] [blame] | 207 | 'android_deps.gyp:expat', |
djsollen@google.com | 62b24b1 | 2011-12-15 16:16:22 +0000 | [diff] [blame] | 208 | ], |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 209 | }], |
caryclark@google.com | afcb55c | 2011-12-14 17:12:04 +0000 | [diff] [blame] | 210 | ], |
| 211 | 'direct_dependent_settings': { |
| 212 | 'include_dirs': [ |
| 213 | '../include/ports', |
| 214 | ], |
| 215 | }, |
| 216 | }, |
| 217 | ], |
| 218 | } |