Factor out some SSL specific configs, and add another reference to /var/run to
[chromium-blink-merge.git] / app / app.gyp
blob1527c55a2358065e3b0579fac4b0a0f977bdead7
1 # Copyright (c) 2010 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.
6   'variables': {
7     # TODO: remove this helper when we have loops in GYP
8     'apply_locales_cmd': ['python', '<(DEPTH)/build/apply_locales.py',],
9     'chromium_code': 1,
10     'grit_info_cmd': ['python', '../tools/grit/grit_info.py',],
11     'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/app',
12     'grit_cmd': ['python', '../tools/grit/grit.py'],
13     'localizable_resources': [
14       'resources/app_locale_settings.grd',
15       'resources/app_strings.grd',
16     ],
17   },
18   'includes': [
19     'app_base.gypi',
20   ],
21   'targets': [
22     {
23       'target_name': 'app_unittests',
24       'type': 'executable',
25       'msvs_guid': 'B4D59AE8-8D2F-97E1-A8E9-6D2826729530',
26       'dependencies': [
27         'app_base',
28         'app_resources',
29         '../base/base.gyp:test_support_base',
30         '../net/net.gyp:net_test_support',
31         '../skia/skia.gyp:skia',
32         '../testing/gmock.gyp:gmock',
33         '../testing/gtest.gyp:gtest',
34         '../third_party/icu/icu.gyp:icui18n',
35         '../third_party/icu/icu.gyp:icuuc',
36         '../third_party/libpng/libpng.gyp:libpng',
37         '../third_party/zlib/zlib.gyp:zlib',
38         '<(libjpeg_gyp_path):libjpeg',
39       ],
40       'sources': [
41         'animation_container_unittest.cc',
42         'animation_unittest.cc',
43         'clipboard/clipboard_unittest.cc',
44         'l10n_util_mac_unittest.mm',
45         'l10n_util_unittest.cc',
46         'multi_animation_unittest.cc',
47         'os_exchange_data_win_unittest.cc',
48         'run_all_unittests.cc',
49         'slide_animation_unittest.cc',
50         'sql/connection_unittest.cc',
51         'sql/statement_unittest.cc',
52         'sql/transaction_unittest.cc',
53         'system_monitor_unittest.cc',
54         'test_suite.h',
55         'test/data/resource.h',
56         'text_elider_unittest.cc',
57         'tree_node_iterator_unittest.cc',
58         'tree_node_model_unittest.cc',
59         'view_prop_unittest.cc',
60         'win_util_unittest.cc',
61       ],
62       'include_dirs': [
63         '..',
64       ],
65       'conditions': [
66         ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
67           'sources': [
68             'gtk_dnd_util_unittest.cc',
69           ],
70           'dependencies': [
71             'app_unittest_strings',
72             '../build/linux/system.gyp:gtk',
73             '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
74           ],
75         }],
76         ['OS!="win"', {
77           'sources!': [
78             'os_exchange_data_win_unittest.cc',
79             'view_prop_unittest.cc',
80             'win_util_unittest.cc',
81           ],
82         }],
83         ['OS =="linux" or OS =="freebsd"', {
84           'conditions': [
85             ['linux_use_tcmalloc==1', {
86               'dependencies': [
87                 '../base/allocator/allocator.gyp:allocator',
88               ],
89             }],
90           ],
91         }],
92       ],
93     },
94     {
95       'target_name': 'app_strings',
96       'msvs_guid': 'AE9BF4A2-19C5-49D8-BB1A-F28496DD7051',
97       'type': 'none',
98       'rules': [
99         {
100           'rule_name': 'grit',
101           'extension': 'grd',
102           'inputs': [
103             '<!@(<(grit_info_cmd) --inputs <(localizable_resources))',
104           ],
105           'outputs': [
106             '<(grit_out_dir)/<(RULE_INPUT_ROOT)/grit/<(RULE_INPUT_ROOT).h',
107             # TODO: remove this helper when we have loops in GYP
108             '>!@(<(apply_locales_cmd) \'<(grit_out_dir)/<(RULE_INPUT_ROOT)/<(RULE_INPUT_ROOT)_ZZLOCALE.pak\' <(locales))',
109           ],
110           'action': ['<@(grit_cmd)', '-i', '<(RULE_INPUT_PATH)',
111             'build', '-o', '<(grit_out_dir)/<(RULE_INPUT_ROOT)'],
112           'message': 'Generating resources from <(RULE_INPUT_PATH)',
113           'conditions': [
114             ['use_titlecase_in_grd_files==1', {
115               'action': ['-D', 'use_titlecase'],
116             }],
117             ['chromeos==1', {
118               'action': ['-D', 'chromeos'],
119             }],
120           ],
121         },
122       ],
123       'sources': [
124         '<@(localizable_resources)',
125       ],
126       'direct_dependent_settings': {
127         'include_dirs': [
128           '<(grit_out_dir)/app_locale_settings',
129           '<(grit_out_dir)/app_strings',
130         ],
131       },
132       'conditions': [
133         ['OS=="win"', {
134           'dependencies': ['../build/win/system.gyp:cygwin'],
135         }],
136       ],
137     },
138     {
139       'target_name': 'app_resources',
140       'type': 'none',
141       'msvs_guid': '3FBC4235-3FBD-46DF-AEDC-BADBBA13A095',
142       'actions': [
143         {
144           'action_name': 'app_resources',
145           'variables': {
146             'input_path': 'resources/app_resources.grd',
147           },
148           'inputs': [
149             '<!@(<(grit_info_cmd) --inputs <(input_path))',
150           ],
151           'outputs': [
152             '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)/app_resources\' <(input_path))',
153           ],
154           'action': ['<@(grit_cmd)',
155                      '-i', '<(input_path)', 'build',
156                      '-o', '<(grit_out_dir)/app_resources'],
157           'conditions': [
158             ['toolkit_views==1', {
159               'action': ['-D', 'toolkit_views'],
160             }],
161           ],
162           'message': 'Generating resources from <(input_path)',
163         },
164       ],
165       'direct_dependent_settings': {
166         'include_dirs': [
167           '<(grit_out_dir)/app_resources',
168         ],
169       },
170       'conditions': [
171         ['OS=="win"', {
172           'dependencies': ['../build/win/system.gyp:cygwin'],
173         }],
174       ],
175     },
176   ],
177   'conditions': [
178     ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
179       'targets': [{
180         'target_name': 'app_unittest_strings',
181         'type': 'none',
182         'variables': {
183           'repack_path': '<(DEPTH)/tools/data_pack/repack.py',
184         },
185         'actions': [
186           {
187             'action_name': 'repack_app_unittest_strings',
188             'variables': {
189               'pak_inputs': [
190                 '<(grit_out_dir)/app_strings/app_strings_en-US.pak',
191                 '<(grit_out_dir)/app_locale_settings/app_locale_settings_en-US.pak',
192               ],
193             },
194             'inputs': [
195               '<(repack_path)',
196               '<@(pak_inputs)',
197             ],
198             'outputs': [
199               '<(PRODUCT_DIR)/app_unittests_strings/en-US.pak',
200             ],
201             'action': ['python', '<(repack_path)', '<@(_outputs)',
202                        '<@(pak_inputs)'],
203           },
204         ],
205         'copies': [
206           {
207             'destination': '<(PRODUCT_DIR)/app_unittests_strings',
208             'files': [
209               '<(grit_out_dir)/app_resources/app_resources.pak',
210             ],
211           },
212         ],
213       }],
214     }],
215   ],
218 # Local Variables:
219 # tab-width:2
220 # indent-tabs-mode:nil
221 # End:
222 # vim: set expandtab tabstop=2 shiftwidth=2: