• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Port-specific Skia library code.
2{
3  'targets': [
4    {
5      'target_name': 'ports',
6      'product_name': 'skia_ports',
7      'type': 'static_library',
8      'standalone_static_library': 1,
9      'dependencies': [
10        'core.gyp:*',
11      ],
12      'include_dirs': [
13        '../include/effects',
14        '../include/images',
15        '../include/ports',
16        '../include/utils',
17        '../include/utils/win',
18        '../include/xml',
19        '../src/core',
20        '../src/lazy',
21        '../src/ports',
22        '../src/sfnt',
23        '../src/utils',
24      ],
25      'sources': [
26        '../src/ports/SkAtomics_sync.h',
27        '../src/ports/SkAtomics_win.h',
28        '../src/ports/SkMutex_pthread.h',
29        '../src/ports/SkMutex_win.h',
30        '../src/ports/SkDebug_nacl.cpp',
31        '../src/ports/SkDebug_stdio.cpp',
32        '../src/ports/SkDebug_win.cpp',
33
34        '../src/fonts/SkFontMgr_indirect.cpp',
35        '../src/fonts/SkRemotableFontMgr.cpp',
36        '../src/ports/SkFontHost_win.cpp',
37        '../src/ports/SkFontMgr_default_gdi.cpp',
38        '../src/ports/SkFontMgr_default_dw.cpp',
39        '../src/ports/SkFontMgr_win_dw.cpp',
40        '../src/ports/SkRemotableFontMgr_win_dw.cpp',
41        '../src/ports/SkScalerContext_win_dw.cpp',
42        '../src/ports/SkScalerContext_win_dw.h',
43        '../src/ports/SkTypeface_win_dw.cpp',
44        '../src/ports/SkTypeface_win_dw.h',
45
46        '../src/ports/SkGlobalInitialization_default.cpp',
47        '../src/ports/SkMemory_malloc.cpp',
48        '../src/ports/SkMutex_pthread.h',
49        '../src/ports/SkMutex_win.h',
50        '../src/ports/SkOSFile_posix.cpp',
51        '../src/ports/SkOSFile_stdio.cpp',
52        '../src/ports/SkOSFile_win.cpp',
53        '../src/ports/SkDiscardableMemory_none.cpp',
54        '../src/ports/SkTime_Unix.cpp',
55        '../src/ports/SkTime_win.cpp',
56        '../src/ports/SkTLS_pthread.cpp',
57        '../src/ports/SkTLS_win.cpp',
58        '../src/ports/SkXMLParser_empty.cpp',
59
60        '../include/ports/SkFontConfigInterface.h',
61        '../include/ports/SkFontMgr.h',
62        '../include/ports/SkFontMgr_indirect.h',
63        '../include/ports/SkFontStyle.h',
64        '../include/ports/SkRemotableFontMgr.h',
65      ],
66      'conditions': [
67        [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos", "nacl", "android"]', {
68          'sources': [
69            '../src/ports/SkFontHost_FreeType.cpp',
70            '../src/ports/SkFontHost_FreeType_common.cpp',
71          ],
72          'dependencies': [
73            'freetype.gyp:freetype',
74          ],
75        }],
76        [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
77          'conditions': [
78            [ 'skia_no_fontconfig', {
79              'link_settings': {
80                'libraries': [
81                  '-ldl',
82                ],
83              },
84              'sources': [
85                '../src/ports/SkFontHost_linux.cpp',
86              ],
87            }, {
88              'link_settings': {
89                'libraries': [
90                  '-lfontconfig',
91                  '-ldl',
92                ],
93              },
94              'sources': [
95                '../src/ports/SkFontMgr_fontconfig.cpp',
96                '../src/ports/SkFontHost_fontconfig.cpp',
97                '../src/ports/SkFontConfigInterface_direct.cpp',
98              ],
99            }]
100          ],
101        }],
102        [ 'skia_os == "nacl"', {
103          'sources': [
104            '../src/ports/SkFontHost_linux.cpp',
105          ],
106          'sources!': [
107            '../src/ports/SkDebug_stdio.cpp',
108          ],
109        }, {
110          'sources!': [
111            '../src/ports/SkDebug_nacl.cpp',
112          ],
113        }],
114        [ 'skia_os == "mac"', {
115          'include_dirs': [
116            '../include/utils/mac',
117          ],
118          'sources': [
119            '../src/ports/SkFontHost_mac.cpp',
120            '../src/utils/mac/SkStream_mac.cpp',
121          ],
122          'sources!': [
123            '../src/ports/SkFontHost_tables.cpp',
124          ],
125        }],
126        [ 'skia_os == "ios"', {
127          'include_dirs': [
128            '../include/utils/ios',
129            '../include/utils/mac',
130          ],
131          'sources': [
132            '../src/ports/SkFontHost_mac.cpp',
133            '../src/utils/mac/SkStream_mac.cpp',
134          ],
135          'sources!': [
136            '../src/ports/SkFontHost_tables.cpp',
137          ],
138        }],
139        [ 'skia_os == "win"', {
140          'include_dirs': [
141            'config/win',
142            '../src/utils/win',
143          ],
144          'sources!': [ # these are used everywhere but windows
145            '../src/ports/SkDebug_stdio.cpp',
146            '../src/ports/SkOSFile_posix.cpp',
147            '../src/ports/SkTime_Unix.cpp',
148            '../src/ports/SkTLS_pthread.cpp',
149          ],
150          'conditions': [
151            #    when we build for win, we only want one of these default files
152            [ 'skia_gdi', {
153              'sources!': [
154                '../src/ports/SkFontMgr_default_dw.cpp',
155              ],
156            }, { # normally default to direct write
157              'sources!': [
158                '../src/ports/SkFontMgr_default_gdi.cpp',
159              ],
160            }],
161          ],
162        }, { # else !win
163          'sources!': [
164            '../src/ports/SkDebug_win.cpp',
165            '../src/ports/SkFontHost_win.cpp',
166            '../src/ports/SkFontMgr_default_gdi.cpp',
167            '../src/ports/SkFontMgr_default_dw.cpp',
168            '../src/ports/SkFontMgr_win_dw.cpp',
169            '../src/ports/SkOSFile_win.cpp',
170            '../src/ports/SkRemotableFontMgr_win_dw.cpp',
171            '../src/ports/SkTime_win.cpp',
172            '../src/ports/SkTLS_win.cpp',
173            '../src/ports/SkScalerContext_win_dw.cpp',
174            '../src/ports/SkScalerContext_win_dw.h',
175            '../src/ports/SkTypeface_win_dw.cpp',
176            '../src/ports/SkTypeface_win_dw.h',
177          ],
178        }],
179        [ 'skia_os == "android"', {
180          'sources!': [
181            '../src/ports/SkDebug_stdio.cpp',
182          ],
183          'sources': [
184            '../src/ports/SkDebug_android.cpp',
185            '../src/ports/SkFontConfigParser_android.cpp',
186            '../src/ports/SkFontMgr_android.cpp',
187          ],
188          'dependencies': [
189             'android_deps.gyp:expat',
190          ],
191        }],
192      ],
193      'direct_dependent_settings': {
194        'include_dirs': [
195          '../include/ports',
196        ],
197      },
198    },
199  ],
200}
201