blob: 2e8fc184dbef64e203cef4605b58447f5a636877 [file] [log] [blame]
[email protected]3e1d8c82012-05-31 04:36:031# Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]40ce1e442011-06-30 15:03:112# 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',
[email protected]d4526962011-11-10 21:40:2812 'type': '<(component)',
[email protected]40ce1e442011-06-30 15:03:1113 'dependencies': [
14 '../base/base.gyp:base',
15 '../third_party/sqlite/sqlite.gyp:sqlite',
16 ],
[email protected]4350e322013-06-18 22:18:1017 'export_dependent_settings': [
18 '../base/base.gyp:base',
19 ],
[email protected]d4526962011-11-10 21:40:2820 'defines': [ 'SQL_IMPLEMENTATION' ],
[email protected]40ce1e442011-06-30 15:03:1121 'sources': [
[email protected]f0a54b22011-07-19 18:40:2122 'connection.cc',
23 'connection.h',
[email protected]0d04ede2012-10-18 04:31:5324 'error_delegate_util.cc',
25 'error_delegate_util.h',
[email protected]f0a54b22011-07-19 18:40:2126 'init_status.h',
27 'meta_table.cc',
28 'meta_table.h',
29 'statement.cc',
30 'statement.h',
31 'transaction.cc',
32 'transaction.h',
[email protected]40ce1e442011-06-30 15:03:1133 ],
[email protected]4350e322013-06-18 22:18:1034 'include_dirs': [
35 '..',
36 ],
37 'direct_dependent_settings': {
38 'include_dirs': [
39 '..',
40 ],
41 },
[email protected]4be31d42013-01-11 18:47:5342 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
43 'msvs_disabled_warnings': [4267, ],
[email protected]40ce1e442011-06-30 15:03:1144 },
45 {
[email protected]4350e322013-06-18 22:18:1046 'target_name': 'test_support_sql',
47 'type': 'static_library',
48 'dependencies': [
49 'sql',
50 '../base/base.gyp:base',
51 '../testing/gtest.gyp:gtest',
52 ],
53 'export_dependent_settings': [
54 'sql',
55 '../base/base.gyp:base',
56 ],
57 'sources': [
[email protected]98cf3002013-07-12 01:38:5658 'test/error_callback_support.cc',
59 'test/error_callback_support.h',
[email protected]4350e322013-06-18 22:18:1060 'test/scoped_error_ignorer.cc',
61 'test/scoped_error_ignorer.h',
62 ],
63 'include_dirs': [
64 '..',
65 ],
66 'direct_dependent_settings': {
67 'include_dirs': [
68 '..',
69 ],
70 },
71 },
72 {
[email protected]40ce1e442011-06-30 15:03:1173 'target_name': 'sql_unittests',
[email protected]3e1d8c82012-05-31 04:36:0374 'type': '<(gtest_target_type)',
[email protected]40ce1e442011-06-30 15:03:1175 'dependencies': [
76 'sql',
[email protected]4350e322013-06-18 22:18:1077 'test_support_sql',
[email protected]40ce1e442011-06-30 15:03:1178 '../base/base.gyp:test_support_base',
79 '../testing/gtest.gyp:gtest',
80 ],
81 'sources': [
[email protected]f0a54b22011-07-19 18:40:2182 'run_all_unittests.cc',
83 'connection_unittest.cc',
84 'sqlite_features_unittest.cc',
85 'statement_unittest.cc',
86 'transaction_unittest.cc',
[email protected]40ce1e442011-06-30 15:03:1187 ],
88 'include_dirs': [
89 '..',
90 ],
91 'conditions': [
[email protected]073bef82012-07-24 18:03:4792 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]40ce1e442011-06-30 15:03:1193 'conditions': [
94 ['linux_use_tcmalloc==1', {
95 'dependencies': [
96 '../base/allocator/allocator.gyp:allocator',
97 ],
98 }],
99 ],
100 }],
[email protected]3e1d8c82012-05-31 04:36:03101 ['OS == "android" and gtest_target_type == "shared_library"', {
102 'dependencies': [
103 '../testing/android/native_test.gyp:native_test_native_code',
104 ],
105 }],
[email protected]40ce1e442011-06-30 15:03:11106 ],
[email protected]4be31d42013-01-11 18:47:53107 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
108 'msvs_disabled_warnings': [4267, ],
[email protected]40ce1e442011-06-30 15:03:11109 },
110 ],
[email protected]3e1d8c82012-05-31 04:36:03111 'conditions': [
112 # Special target to wrap a gtest_target_type==shared_library
113 # sql_unittests into an android apk for execution.
114 ['OS == "android" and gtest_target_type == "shared_library"', {
115 'targets': [
116 {
117 'target_name': 'sql_unittests_apk',
118 'type': 'none',
119 'dependencies': [
[email protected]3e1d8c82012-05-31 04:36:03120 'sql_unittests',
121 ],
122 'variables': {
123 'test_suite_name': 'sql_unittests',
124 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sql_unittests<(SHARED_LIB_SUFFIX)',
[email protected]3e1d8c82012-05-31 04:36:03125 },
126 'includes': [ '../build/apk_test.gypi' ],
127 },
128 ],
129 }],
130 ],
[email protected]40ce1e442011-06-30 15:03:11131}