Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / skia / skia.gyp
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 {
6   'conditions': [
7     # In component mode (shared_lib), we build all of skia as a single DLL.
8     # However, in the static mode, we need to build skia as multiple targets
9     # in order to support the use case where a platform (e.g. Android) may
10     # already have a copy of skia as a system library.
11     ['component=="static_library" and use_system_skia==0', {
12       'targets': [
13         {
14           'target_name': 'skia_library',
15           'type': 'static_library',
16           'includes': [
17             'skia_library.gypi',
18             'skia_common.gypi',
19           ],
20         },
21       ],
22     }],
23     ['component=="static_library" and use_system_skia==1', {
24       'targets': [
25         {
26           'target_name': 'skia_library',
27           'type': 'none',
28           'includes': ['skia_system.gypi'],
29         },
30       ],
31     }],
32     ['component=="static_library"', {
33       'targets': [
34         {
35           'target_name': 'skia',
36           'type': 'none',
37           'dependencies': [
38             'skia_library',
39             'skia_chrome',
40           ],
41           'export_dependent_settings': [
42             'skia_library',
43             'skia_chrome',
44           ],
45         },
46         {
47           'target_name': 'skia_chrome',
48           'type': 'static_library',
49           'includes': [
50             'skia_chrome.gypi',
51             'skia_common.gypi',
52           ],
53         },
54       ],
55     },
56     {  # component != static_library
57       'targets': [
58         {
59           'target_name': 'skia',
60           'type': 'shared_library',
61           'includes': [
62             'skia_library.gypi',
63             'skia_chrome.gypi',
64             'skia_common.gypi',
65           ],
66           'defines': [
67             'SKIA_DLL',
68             'SKIA_IMPLEMENTATION=1',
69             'GR_GL_IGNORE_ES3_MSAA=0',
70           ],
71           'direct_dependent_settings': {
72             'defines': [
73               'SKIA_DLL',
74               'GR_GL_IGNORE_ES3_MSAA=0',
75             ],
76           },
77         },
78         {
79           'target_name': 'skia_library',
80           'type': 'none',
81         },
82         {
83           'target_name': 'skia_chrome',
84           'type': 'none',
85         },
86       ],
87     }],
88   ],
89
90   # targets that are not dependent upon the component type
91   'targets': [
92     {
93       'target_name': 'skia_chrome_opts',
94       'type': 'static_library',
95       'include_dirs': [
96         '..',
97         'config',
98         '../third_party/skia/include/core',
99       ],
100       'conditions': [
101         [ 'os_posix == 1 and OS != "mac" and OS != "android" and \
102             target_arch != "arm" and target_arch != "mipsel" and \
103             target_arch != "arm64" and target_arch != "mips64el"', {
104           'cflags': [
105             '-msse2',
106           ],
107         }],
108         [ 'target_arch != "arm" and target_arch != "mipsel" and \
109            target_arch != "arm64" and target_arch != "mips64el"', {
110           'sources': [
111             'ext/convolver_SSE2.cc',
112           ],
113         }],
114         [ 'target_arch == "mipsel"',{
115           'cflags': [
116             '-fomit-frame-pointer',
117           ],
118           'sources': [
119             'ext/convolver_mips_dspr2.cc',
120           ],
121         }],
122       ],
123     },
124     {
125       'target_name': 'image_operations_bench',
126       'type': 'executable',
127       'dependencies': [
128         '../base/base.gyp:base',
129         'skia',
130       ],
131       'include_dirs': [
132         '..',
133       ],
134       'sources': [
135         'ext/image_operations_bench.cc',
136       ],
137     },
138     {
139       'target_name': 'filter_fuzz_stub',
140       'type': 'executable',
141       'dependencies': [
142         '../base/base.gyp:base',
143         'skia.gyp:skia',
144       ],
145       'sources': [
146         'tools/filter_fuzz_stub/filter_fuzz_stub.cc',
147       ],
148     },
149   ],
150 }