Don't crash when SimpleCache index is corrupt.
[chromium-blink-merge.git] / chrome / common_constants.gyp
blob7020f80e062e5bb7e9f6b908fa5b0de53f57527a
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.
6   'variables': {
7     'chromium_code': 1,
8   },
10   'includes': [
11     'version.gypi',
12   ],
14   'target_defaults': {
15     'sources': [
16       'common/chrome_constants.cc',
17       'common/chrome_constants.h',
18       'common/chrome_paths.cc',
19       'common/chrome_paths.h',
20       'common/chrome_paths_android.cc',
21       'common/chrome_paths_internal.h',
22       'common/chrome_paths_linux.cc',
23       'common/chrome_paths_mac.mm',
24       'common/chrome_paths_win.cc',
25       'common/chrome_switches.cc',
26       'common/chrome_switches.h',
27       'common/env_vars.cc',
28       'common/env_vars.h',
29       'common/net/test_server_locations.cc',
30       'common/net/test_server_locations.h',
31       'common/pref_font_script_names-inl.h',
32       'common/pref_font_webkit_names.h',
33       'common/pref_names.cc',
34       'common/pref_names.h',
35       'common/widevine_cdm_constants.cc',
36       'common/widevine_cdm_constants.h',
37     ],
38     'actions': [
39       {
40         'action_name': 'Make chrome_version.cc',
41         'variables': {
42           'make_version_cc_path': 'tools/build/make_version_cc.py',
43         },
44         'inputs': [
45           '<(make_version_cc_path)',
46           'VERSION',
47         ],
48         'outputs': [
49           '<(INTERMEDIATE_DIR)/chrome_version.cc',
50         ],
51         'action': [
52           'python',
53           '<(make_version_cc_path)',
54           '<@(_outputs)',
55           '<(version_full)',
56         ],
57         'process_outputs_as_sources': 1,
58       },
59     ],
60   },
61   'targets': [
62     {
63       'target_name': 'common_constants',
64       'type': 'static_library',
65       'include_dirs': [
66         '<(SHARED_INTERMEDIATE_DIR)',  # Needed by chrome_paths.cc.
67       ],
68       'dependencies': [
69         '../base/base.gyp:base',
70         '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
71       ],
72       'target_conditions': [
73         ['OS=="ios"', {
74           # iOS needs chrome_paths_mac, which is excluded by filename rules;
75           # re-add it in target_conditionals so it's after that exclusion.
76           'sources/': [
77             ['include', '^common/chrome_paths_mac\\.mm$'],
78           ],
79         }],
80       ],
81       'conditions': [
82         ['toolkit_uses_gtk == 1', {
83           'dependencies': ['../build/linux/system.gyp:gtk'],
84         }],
85       ],
86     },
87   ],
88   'conditions': [
89     ['OS=="win" and target_arch=="ia32"', {
90       'targets': [
91         {
92           'target_name': 'common_constants_win64',
93           'type': 'static_library',
94           'include_dirs': [
95             '<(SHARED_INTERMEDIATE_DIR)',  # Needed by chrome_paths.cc.
96           ],
97           'dependencies': [
98             '../base/base.gyp:base_nacl_win64',
99             '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
100           ],
101           'defines': [
102             '<@(nacl_win64_defines)',
103             'COMPILE_CONTENT_STATICALLY',
104           ],
105           'configurations': {
106             'Common_Base': {
107               'msvs_target_platform': 'x64',
108             },
109           },
110         },
111       ],
112     }],
113   ],