blob: 1ececcecee736458635646915112b9fa7d2358ae [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',
[email protected]a7ec1292013-07-22 22:02:1816 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
[email protected]40ce1e442011-06-30 15:03:1117 ],
[email protected]4350e322013-06-18 22:18:1018 'export_dependent_settings': [
19 '../base/base.gyp:base',
20 ],
[email protected]d4526962011-11-10 21:40:2821 'defines': [ 'SQL_IMPLEMENTATION' ],
[email protected]40ce1e442011-06-30 15:03:1122 'sources': [
[email protected]f0a54b22011-07-19 18:40:2123 'connection.cc',
24 'connection.h',
[email protected]0d04ede2012-10-18 04:31:5325 'error_delegate_util.cc',
26 'error_delegate_util.h',
[email protected]f0a54b22011-07-19 18:40:2127 'init_status.h',
28 'meta_table.cc',
29 'meta_table.h',
[email protected]8d409412013-07-19 18:25:3030 'recovery.cc',
31 'recovery.h',
[email protected]f0a54b22011-07-19 18:40:2132 'statement.cc',
33 'statement.h',
34 'transaction.cc',
35 'transaction.h',
[email protected]40ce1e442011-06-30 15:03:1136 ],
[email protected]4350e322013-06-18 22:18:1037 'include_dirs': [
38 '..',
39 ],
40 'direct_dependent_settings': {
41 'include_dirs': [
42 '..',
43 ],
44 },
[email protected]4be31d42013-01-11 18:47:5345 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
46 'msvs_disabled_warnings': [4267, ],
[email protected]40ce1e442011-06-30 15:03:1147 },
48 {
[email protected]4350e322013-06-18 22:18:1049 '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': [
[email protected]98cf3002013-07-12 01:38:5661 'test/error_callback_support.cc',
62 'test/error_callback_support.h',
[email protected]4350e322013-06-18 22:18:1063 'test/scoped_error_ignorer.cc',
64 'test/scoped_error_ignorer.h',
65 ],
66 'include_dirs': [
67 '..',
68 ],
69 'direct_dependent_settings': {
70 'include_dirs': [
71 '..',
72 ],
73 },
74 },
75 {
[email protected]40ce1e442011-06-30 15:03:1176 'target_name': 'sql_unittests',
[email protected]3e1d8c82012-05-31 04:36:0377 'type': '<(gtest_target_type)',
[email protected]40ce1e442011-06-30 15:03:1178 'dependencies': [
79 'sql',
[email protected]4350e322013-06-18 22:18:1080 'test_support_sql',
[email protected]40ce1e442011-06-30 15:03:1181 '../base/base.gyp:test_support_base',
82 '../testing/gtest.gyp:gtest',
83 ],
84 'sources': [
[email protected]f0a54b22011-07-19 18:40:2185 'run_all_unittests.cc',
86 'connection_unittest.cc',
[email protected]8d409412013-07-19 18:25:3087 'recovery_unittest.cc',
[email protected]f0a54b22011-07-19 18:40:2188 'sqlite_features_unittest.cc',
89 'statement_unittest.cc',
90 'transaction_unittest.cc',
[email protected]40ce1e442011-06-30 15:03:1191 ],
92 'include_dirs': [
93 '..',
94 ],
95 'conditions': [
[email protected]073bef82012-07-24 18:03:4796 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]40ce1e442011-06-30 15:03:1197 'conditions': [
98 ['linux_use_tcmalloc==1', {
99 'dependencies': [
100 '../base/allocator/allocator.gyp:allocator',
101 ],
102 }],
103 ],
104 }],
[email protected]3e1d8c82012-05-31 04:36:03105 ['OS == "android" and gtest_target_type == "shared_library"', {
106 'dependencies': [
107 '../testing/android/native_test.gyp:native_test_native_code',
108 ],
109 }],
[email protected]40ce1e442011-06-30 15:03:11110 ],
[email protected]4be31d42013-01-11 18:47:53111 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
112 'msvs_disabled_warnings': [4267, ],
[email protected]40ce1e442011-06-30 15:03:11113 },
114 ],
[email protected]3e1d8c82012-05-31 04:36:03115 'conditions': [
116 # Special target to wrap a gtest_target_type==shared_library
117 # sql_unittests into an android apk for execution.
118 ['OS == "android" and gtest_target_type == "shared_library"', {
119 'targets': [
120 {
121 'target_name': 'sql_unittests_apk',
122 'type': 'none',
123 'dependencies': [
[email protected]3e1d8c82012-05-31 04:36:03124 'sql_unittests',
125 ],
126 'variables': {
127 'test_suite_name': 'sql_unittests',
128 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sql_unittests<(SHARED_LIB_SUFFIX)',
[email protected]3e1d8c82012-05-31 04:36:03129 },
130 'includes': [ '../build/apk_test.gypi' ],
131 },
132 ],
133 }],
134 ],
[email protected]40ce1e442011-06-30 15:03:11135}