Expose distiller functions to JavaScript
[chromium-blink-merge.git] / sql / sql.gyp
blob018b287ce665b867495e601c6e85b2d36c8fec45
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   'targets': [
10     {
11       'target_name': 'sql',
12       'type': '<(component)',
13       'dependencies': [
14         '../base/base.gyp:base',
15         '../third_party/sqlite/sqlite.gyp:sqlite',
16         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
17       ],
18       'export_dependent_settings': [
19         '../base/base.gyp:base',
20       ],
21       'defines': [ 'SQL_IMPLEMENTATION' ],
22       'sources': [
23         'connection.cc',
24         'connection.h',
25         'error_delegate_util.cc',
26         'error_delegate_util.h',
27         'init_status.h',
28         'meta_table.cc',
29         'meta_table.h',
30         'recovery.cc',
31         'recovery.h',
32         'statement.cc',
33         'statement.h',
34         'transaction.cc',
35         'transaction.h',
36       ],
37       'include_dirs': [
38         '..',
39       ],
40       'direct_dependent_settings': {
41         'include_dirs': [
42           '..',
43         ],
44       },
45       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
46       'msvs_disabled_warnings': [4267, ],
47     },
48     {
49       'target_name': 'test_support_sql',
50       'type': 'static_library',
51       'dependencies': [
52         'sql',
53         '../base/base.gyp:base',
54         '../testing/gtest.gyp:gtest',
55         '../third_party/sqlite/sqlite.gyp:sqlite',
56       ],
57       'export_dependent_settings': [
58         'sql',
59         '../base/base.gyp:base',
60       ],
61       'sources': [
62         'test/error_callback_support.cc',
63         'test/error_callback_support.h',
64         'test/scoped_error_ignorer.cc',
65         'test/scoped_error_ignorer.h',
66         'test/test_helpers.cc',
67         'test/test_helpers.h',
68       ],
69       'include_dirs': [
70         '..',
71       ],
72       'direct_dependent_settings': {
73         'include_dirs': [
74           '..',
75         ],
76       },
77     },
78     {
79       'target_name': 'sql_unittests',
80       'type': '<(gtest_target_type)',
81       'dependencies': [
82         'sql',
83         'test_support_sql',
84         '../base/base.gyp:test_support_base',
85         '../testing/gtest.gyp:gtest',
86         '../third_party/sqlite/sqlite.gyp:sqlite',
87       ],
88       'sources': [
89         'connection_unittest.cc',
90         'meta_table_unittest.cc',
91         'recovery_unittest.cc',
92         'sqlite_features_unittest.cc',
93         'statement_unittest.cc',
94         'test/paths.cc',
95         'test/paths.h',
96         'test/run_all_unittests.cc',
97         'test/sql_test_base.cc',
98         'test/sql_test_base.h',
99         'test/sql_test_suite.cc',
100         'test/sql_test_suite.h',
101         'transaction_unittest.cc',
102       ],
103       'include_dirs': [
104         '..',
105       ],
106       'conditions': [
107         ['os_posix==1 and OS!="mac" and OS!="ios"', {
108           'conditions': [
109             ['use_allocator!="none"', {
110               'dependencies': [
111                 '../base/allocator/allocator.gyp:allocator',
112               ],
113             }],
114           ],
115         }],
116         ['OS == "android"', {
117           'dependencies': [
118             '../testing/android/native_test.gyp:native_test_native_code',
119           ],
120         }],
121       ],
122       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
123       'msvs_disabled_warnings': [4267, ],
124     },
125   ],
126   'conditions': [
127     ['OS == "android"', {
128       'targets': [
129         {
130           'target_name': 'sql_unittests_apk',
131           'type': 'none',
132           'dependencies': [
133             'sql_unittests',
134           ],
135           'variables': {
136             'test_suite_name': 'sql_unittests',
137             'isolate_file': 'sql_unittests.isolate',
138           },
139           'includes': [ '../build/apk_test.gypi' ],
140         },
141       ],
142     }],
143     ['test_isolation_mode != "noop"', {
144       'targets': [
145         {
146           'target_name': 'sql_unittests_run',
147           'type': 'none',
148           'dependencies': [
149             'sql_unittests',
150           ],
151           'includes': [
152             '../build/isolate.gypi',
153           ],
154           'sources': [
155             'sql_unittests.isolate',
156           ],
157         },
158       ],
159     }],
160   ],