Disable input view by default.
[chromium-blink-merge.git] / crypto / crypto.gyp
blob23b29861c3f749773da4cede16f2aeffeb926758
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   },
9   'includes': [
10     'crypto.gypi',
11   ],
12   'targets': [
13     {
14       'target_name': 'crypto',
15       'type': '<(component)',
16       'product_name': 'crcrypto',  # Avoid colliding with OpenSSL's libcrypto
17       'dependencies': [
18         '../base/base.gyp:base',
19         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
20       ],
21       'defines': [
22         'CRYPTO_IMPLEMENTATION',
23       ],
24       'msvs_disabled_warnings': [
25         4018,
26       ],
27       'conditions': [
28         [ 'os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
29           'dependencies': [
30             '../build/linux/system.gyp:ssl',
31           ],
32           'export_dependent_settings': [
33             '../build/linux/system.gyp:ssl',
34           ],
35           'conditions': [
36             [ 'chromeos==1', {
37                 'sources/': [ ['include', '_chromeos\\.cc$'] ]
38               },
39             ],
40           ],
41         }, {  # os_posix != 1 or OS == "mac" or OS == "ios" or OS == "android"
42             'sources!': [
43               'hmac_win.cc',
44               'openpgp_symmetric_encryption.cc',
45               'openpgp_symmetric_encryption.h',
46               'symmetric_key_win.cc',
47             ],
48         }],
49         [ 'OS != "mac" and OS != "ios"', {
50           'sources!': [
51             'apple_keychain.h',
52             'mock_apple_keychain.cc',
53             'mock_apple_keychain.h',
54           ],
55         }],
56         [ 'OS == "android"', {
57             'includes': [
58               '../build/android/cpufeatures.gypi',
59             ],
60         }],
61         [ 'os_bsd==1', {
62           'link_settings': {
63             'libraries': [
64               '-L/usr/local/lib -lexecinfo',
65               ],
66             },
67           },
68         ],
69         [ 'OS == "mac"', {
70           'link_settings': {
71             'libraries': [
72               '$(SDKROOT)/System/Library/Frameworks/Security.framework',
73             ],
74           },
75         }, {  # OS != "mac"
76           'sources!': [
77             'cssm_init.cc',
78             'cssm_init.h',
79             'mac_security_services_lock.cc',
80             'mac_security_services_lock.h',
81           ],
82         }],
83         [ 'OS == "mac" or OS == "ios" or OS == "win"', {
84           'dependencies': [
85             '../third_party/nss/nss.gyp:nspr',
86             '../third_party/nss/nss.gyp:nss',
87           ],
88           'export_dependent_settings': [
89             '../third_party/nss/nss.gyp:nspr',
90             '../third_party/nss/nss.gyp:nss',
91           ],
92         }],
93         [ 'OS != "win"', {
94           'sources!': [
95             'capi_util.h',
96             'capi_util.cc',
97           ],
98         }],
99         [ 'OS == "win"', {
100           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
101           'msvs_disabled_warnings': [4267, ],
102         }],
103         [ 'use_openssl==1', {
104             'dependencies': [
105               '../third_party/openssl/openssl.gyp:openssl',
106             ],
107             # TODO(joth): Use a glob to match exclude patterns once the
108             #             OpenSSL file set is complete.
109             'sources!': [
110               'ec_private_key_nss.cc',
111               'ec_signature_creator_nss.cc',
112               'encryptor_nss.cc',
113               'hmac_nss.cc',
114               'nss_util.cc',
115               'nss_util.h',
116               'openpgp_symmetric_encryption.cc',
117               'rsa_private_key_nss.cc',
118               'secure_hash_default.cc',
119               'signature_creator_nss.cc',
120               'signature_verifier_nss.cc',
121               'symmetric_key_nss.cc',
122               'third_party/nss/chromium-blapi.h',
123               'third_party/nss/chromium-blapit.h',
124               'third_party/nss/chromium-nss.h',
125               'third_party/nss/chromium-prtypes.h',
126               'third_party/nss/chromium-sha256.h',
127               'third_party/nss/pk11akey.cc',
128               'third_party/nss/rsawrapr.c',
129               'third_party/nss/secsign.cc',
130               'third_party/nss/sha512.cc',
131             ],
132           }, {
133             'sources!': [
134               'ec_private_key_openssl.cc',
135               'ec_signature_creator_openssl.cc',
136               'encryptor_openssl.cc',
137               'hmac_openssl.cc',
138               'openssl_util.cc',
139               'openssl_util.h',
140               'rsa_private_key_openssl.cc',
141               'secure_hash_openssl.cc',
142               'signature_creator_openssl.cc',
143               'signature_verifier_openssl.cc',
144               'symmetric_key_openssl.cc',
145             ],
146         },],
147       ],
148       'sources': [
149         '<@(crypto_sources)',
150       ],
151     },
152     {
153       'target_name': 'crypto_unittests',
154       'type': 'executable',
155       'sources': [
156         'curve25519_unittest.cc',
157         'ec_private_key_unittest.cc',
158         'ec_signature_creator_unittest.cc',
159         'encryptor_unittest.cc',
160         'ghash_unittest.cc',
161         'hkdf_unittest.cc',
162         'hmac_unittest.cc',
163         'nss_util_unittest.cc',
164         'p224_unittest.cc',
165         'p224_spake_unittest.cc',
166         'random_unittest.cc',
167         'rsa_private_key_unittest.cc',
168         'rsa_private_key_nss_unittest.cc',
169         'secure_hash_unittest.cc',
170         'sha2_unittest.cc',
171         'signature_creator_unittest.cc',
172         'signature_verifier_unittest.cc',
173         'symmetric_key_unittest.cc',
174         'openpgp_symmetric_encryption_unittest.cc',
175       ],
176       'dependencies': [
177         'crypto',
178         '../base/base.gyp:base',
179         '../base/base.gyp:run_all_unittests',
180         '../base/base.gyp:test_support_base',
181         '../testing/gmock.gyp:gmock',
182         '../testing/gtest.gyp:gtest',
183       ],
184       'conditions': [
185         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
186           'conditions': [
187             # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
188             [ '(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
189                 'dependencies': [
190                   '../base/allocator/allocator.gyp:allocator',
191                 ],
192               },
193             ],
194           ],
195           'dependencies': [
196             '../build/linux/system.gyp:ssl',
197           ],
198         }, {  # os_posix != 1 or OS == "mac" or OS == "android" or OS == "ios"
199           'sources!': [
200             'rsa_private_key_nss_unittest.cc',
201             'openpgp_symmetric_encryption_unittest.cc',
202           ]
203         }],
204         [ 'OS == "mac" or OS == "ios" or OS == "win"', {
205           'dependencies': [
206             '../third_party/nss/nss.gyp:nss',
207           ],
208         }],
209         [ 'OS == "mac"', {
210           'dependencies': [
211             '../third_party/nss/nss.gyp:nspr',
212           ],
213         }],
214         [ 'OS == "win"', {
215           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
216           'msvs_disabled_warnings': [4267, ],
217         }],
218         [ 'use_openssl==1', {
219           'sources!': [
220             'nss_util_unittest.cc',
221             'openpgp_symmetric_encryption_unittest.cc',
222             'rsa_private_key_nss_unittest.cc',
223           ],
224         }],
225       ],
226     },
227   ],
228   'conditions': [
229     ['OS == "win" and target_arch=="ia32"', {
230       'targets': [
231         {
232           'target_name': 'crypto_nacl_win64',
233           # We do not want nacl_helper to depend on NSS because this would
234           # require including a 64-bit copy of NSS. Thus, use the native APIs
235           # for the helper.
236           'type': '<(component)',
237           'dependencies': [
238             '../base/base.gyp:base_win64',
239             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
240           ],
241           'sources': [
242             '<@(hmac_win64_related_sources)',
243           ],
244           'defines': [
245            'CRYPTO_IMPLEMENTATION',
246            '<@(nacl_win64_defines)',
247           ],
248           'msvs_disabled_warnings': [
249             4018,
250           ],
251           'configurations': {
252             'Common_Base': {
253               'msvs_target_platform': 'x64',
254             },
255           },
256         },
257       ],
258     }],
259   ],