- add sources.
[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           ],
70           'direct_dependent_settings': {
71             'defines': [
72               'SKIA_DLL',
73             ],
74           },
75         },
76         {
77           'target_name': 'skia_library',
78           'type': 'none',
79         },
80         {
81           'target_name': 'skia_chrome',
82           'type': 'none',
83         },
84       ],
85     }],
86   ],
87
88   # targets that are not dependent upon the component type
89   'targets': [
90     {
91       'target_name': 'skia_chrome_opts',
92       'type': 'static_library',
93       'include_dirs': [
94         '..',
95         'config',
96         '../third_party/skia/include/core',
97       ],
98       'conditions': [
99         [ 'os_posix == 1 and OS != "mac" and OS != "android" and \
100             target_arch != "arm" and target_arch != "mipsel"', {
101           'cflags': [
102             '-msse2',
103           ],
104         }],
105         [ 'target_arch != "arm" and target_arch != "mipsel"', {
106           'sources': [
107             'ext/convolver_SSE2.cc',
108           ],
109         }],
110         [ 'target_arch == "mipsel"',{
111           'cflags': [
112             '-fomit-frame-pointer',
113           ],
114           'sources': [
115             'ext/convolver_mips_dspr2.cc',
116           ],
117         }],
118       ],
119     },
120     {
121       'target_name': 'image_operations_bench',
122       'type': 'executable',
123       'dependencies': [
124         '../base/base.gyp:base',
125         'skia',
126       ],
127       'include_dirs': [
128         '..',
129       ],
130       'sources': [
131         'ext/image_operations_bench.cc',
132       ],
133     },
134   ],
135 }