[M108 Migration][HBBTV] Implement ewk_context_register_jsplugin_mime_types API
[platform/framework/web/chromium-efl.git] / sql / BUILD.gn
1 # Copyright 2014 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//testing/test.gni")
6
7 component("sql") {
8   sources = [
9     "database.cc",
10     "database.h",
11     "database_memory_dump_provider.cc",
12     "database_memory_dump_provider.h",
13     "error_delegate_util.cc",
14     "error_delegate_util.h",
15     "init_status.h",
16     "initialization.cc",
17     "initialization.h",
18     "internal_api_token.h",
19     "meta_table.cc",
20     "meta_table.h",
21     "recover_module/btree.cc",
22     "recover_module/btree.h",
23     "recover_module/cursor.cc",
24     "recover_module/cursor.h",
25     "recover_module/integers.cc",
26     "recover_module/integers.h",
27     "recover_module/module.cc",
28     "recover_module/module.h",
29     "recover_module/pager.cc",
30     "recover_module/pager.h",
31     "recover_module/parsing.cc",
32     "recover_module/parsing.h",
33     "recover_module/payload.cc",
34     "recover_module/payload.h",
35     "recover_module/record.cc",
36     "recover_module/record.h",
37     "recover_module/table.cc",
38     "recover_module/table.h",
39     "recovery.cc",
40     "recovery.h",
41     "sandboxed_vfs.cc",
42     "sandboxed_vfs.h",
43     "sandboxed_vfs_file.cc",
44     "sandboxed_vfs_file.h",
45     "sql_features.cc",
46     "sql_features.h",
47     "sql_memory_dump_provider.cc",
48     "sql_memory_dump_provider.h",
49     "sqlite_result_code.cc",
50     "sqlite_result_code.h",
51     "sqlite_result_code_values.cc",
52     "sqlite_result_code_values.h",
53     "statement.cc",
54     "statement.h",
55     "statement_id.cc",
56     "statement_id.h",
57     "transaction.cc",
58     "transaction.h",
59     "vfs_wrapper.cc",
60     "vfs_wrapper.h",
61   ]
62
63   defines = [ "IS_SQL_IMPL" ]
64
65   deps = [
66     "//base",
67     "//base/third_party/dynamic_annotations",
68     "//third_party/sqlite",
69   ]
70
71   # For vfs_wrapper.cc time-machine exclusions.
72   if (is_mac) {
73     frameworks = [
74       "CoreFoundation.framework",
75       "CoreServices.framework",
76     ]
77   }
78
79   if (is_fuchsia) {
80     sources += [
81       "vfs_wrapper_fuchsia.cc",
82       "vfs_wrapper_fuchsia.h",
83     ]
84   }
85 }
86
87 static_library("test_support") {
88   testonly = true
89   sources = [
90     "test/scoped_error_expecter.cc",
91     "test/scoped_error_expecter.h",
92     "test/test_helpers.cc",
93     "test/test_helpers.h",
94   ]
95
96   public_deps = [ ":sql" ]
97   deps = [
98     "//base",
99     "//testing/gtest",
100     "//third_party/sqlite",
101   ]
102 }
103
104 bundle_data("sql_unittests_bundle_data") {
105   testonly = true
106   sources = [ "test/data/recovery_387868" ]
107   outputs = [ "{{bundle_resources_dir}}/" +
108               "{{source_root_relative_dir}}/{{source_file_part}}" ]
109 }
110
111 test("sql_unittests") {
112   sources = [
113     "database_options_unittest.cc",
114     "database_unittest.cc",
115     "meta_table_unittest.cc",
116     "recover_module/module_unittest.cc",
117     "recovery_unittest.cc",
118     "sql_memory_dump_provider_unittest.cc",
119     "sqlite_features_unittest.cc",
120     "sqlite_result_code_unittest.cc",
121     "statement_id_unittest.cc",
122     "statement_unittest.cc",
123     "test/database_test_peer.cc",
124     "test/database_test_peer.h",
125     "test/paths.cc",
126     "test/paths.h",
127     "test/run_all_unittests.cc",
128     "test/sql_test_suite.cc",
129     "test/sql_test_suite.h",
130     "transaction_unittest.cc",
131   ]
132
133   data = [ "test/data/" ]
134
135   deps = [
136     ":sql",
137     ":sql_unittests_bundle_data",
138     ":test_support",
139     "//base/test:test_support",
140     "//testing/gtest",
141     "//third_party/sqlite",
142   ]
143 }