Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / sql / sql.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   '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       ],
56       'export_dependent_settings': [
57         'sql',
58         '../base/base.gyp:base',
59       ],
60       'sources': [
61         'test/error_callback_support.cc',
62         'test/error_callback_support.h',
63         'test/scoped_error_ignorer.cc',
64         'test/scoped_error_ignorer.h',
65         'test/test_helpers.cc',
66         'test/test_helpers.h',
67       ],
68       'include_dirs': [
69         '..',
70       ],
71       'direct_dependent_settings': {
72         'include_dirs': [
73           '..',
74         ],
75       },
76     },
77     {
78       'target_name': 'sql_unittests',
79       'type': '<(gtest_target_type)',
80       'dependencies': [
81         'sql',
82         'test_support_sql',
83         '../base/base.gyp:test_support_base',
84         '../testing/gtest.gyp:gtest',
85         '../third_party/sqlite/sqlite.gyp:sqlite',
86       ],
87       'sources': [
88         'connection_unittest.cc',
89         'meta_table_unittest.cc',
90         'recovery_unittest.cc',
91         'sqlite_features_unittest.cc',
92         'statement_unittest.cc',
93         'test/paths.cc',
94         'test/paths.h',
95         'test/run_all_unittests.cc',
96         'test/sql_test_suite.cc',
97         'test/sql_test_suite.h',
98         'transaction_unittest.cc',
99       ],
100       'include_dirs': [
101         '..',
102       ],
103       'conditions': [
104         ['os_posix==1 and OS!="mac" and OS!="ios"', {
105           'conditions': [
106             ['use_allocator!="none"', {
107               'dependencies': [
108                 '../base/allocator/allocator.gyp:allocator',
109               ],
110             }],
111           ],
112         }],
113         ['OS == "android"', {
114           'dependencies': [
115             '../testing/android/native_test.gyp:native_test_native_code',
116           ],
117         }],
118         ['sqlite_enable_fts2', {
119           'defines': [
120             'SQLITE_ENABLE_FTS2',
121           ],
122         }],
123       ],
124       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
125       'msvs_disabled_warnings': [4267, ],
126     },
127   ],
128   'conditions': [
129     ['OS == "android"', {
130       'targets': [
131         {
132           'target_name': 'sql_unittests_apk',
133           'type': 'none',
134           'dependencies': [
135             'sql_unittests',
136           ],
137           'variables': {
138             'test_suite_name': 'sql_unittests',
139           },
140           'includes': [ '../build/apk_test.gypi' ],
141         },
142       ],
143     }],
144     ['test_isolation_mode != "noop"', {
145       'targets': [
146         {
147           'target_name': 'sql_unittests_run',
148           'type': 'none',
149           'dependencies': [
150             'sql_unittests',
151           ],
152           'includes': [
153             '../build/isolate.gypi',
154           ],
155           'sources': [
156             'sql_unittests.isolate',
157           ],
158         },
159       ],
160     }],
161   ],
162 }