blob: 8f2b64a5bb400a9d027d2a01980b4190e772de51 [file] [log] [blame]
Max Bires44c78812020-04-10 09:38:23 -07001// Copyright 2019 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badour382930d2021-02-12 20:14:08 -080015package {
16 default_applicable_licenses: ["external_libcppbor_license"],
17}
18
19// Added automatically by a large-scale-change
20// See: http://go/android-license-faq
21license {
22 name: "external_libcppbor_license",
23 visibility: [":__subpackages__"],
24 license_kinds: [
25 "SPDX-license-identifier-Apache-2.0",
26 ],
27 license_text: [
28 "LICENSE",
29 ],
30}
31
Shawn Willden03990c22020-11-24 19:05:09 -070032cc_defaults {
33 name: "libcppbor_defaults",
34 cflags: [
35 "-Wall",
36 "-Wextra",
37 "-Werror",
38 ],
39}
40
Max Bires44c78812020-04-10 09:38:23 -070041cc_library {
42 name: "libcppbor_external",
Shawn Willden03990c22020-11-24 19:05:09 -070043 defaults: [
44 "libcppbor_defaults",
45 ],
Max Bires44c78812020-04-10 09:38:23 -070046 vendor_available: true,
47 host_supported: true,
48 srcs: [
49 "src/cppbor.cpp",
50 "src/cppbor_parse.cpp",
51 ],
52 export_include_dirs: [
53 "include/cppbor",
54 ],
55 shared_libs: [
56 "libbase",
Shawn Willden0f9cd2d2020-11-20 00:35:10 -070057 "libcrypto",
Max Bires44c78812020-04-10 09:38:23 -070058 ]
59}
60
61cc_test {
62 name: "cppbor_test_external",
Shawn Willden03990c22020-11-24 19:05:09 -070063 defaults: [
64 "libcppbor_defaults",
65 ],
Max Bires44c78812020-04-10 09:38:23 -070066 srcs: [
67 "tests/cppbor_test.cpp"
68 ],
69 shared_libs: [
Shawn Willden0f9cd2d2020-11-20 00:35:10 -070070 "libcppbor_external",
Max Bires44c78812020-04-10 09:38:23 -070071 "libbase",
72 ],
73 static_libs: [
74 "libgmock",
75 ],
76 test_suites: ["general-tests"],
77}
78
79cc_test_host {
80 name: "cppbor_host_test_external",
Shawn Willden03990c22020-11-24 19:05:09 -070081 defaults: [
82 "libcppbor_defaults",
83 ],
Max Bires44c78812020-04-10 09:38:23 -070084 srcs: [
85 "tests/cppbor_test.cpp"
86 ],
87 shared_libs: [
Shawn Willden0f9cd2d2020-11-20 00:35:10 -070088 "libcppbor_external",
Max Bires44c78812020-04-10 09:38:23 -070089 "libbase",
90 ],
91 static_libs: [
92 "libgmock",
93 ],
94 test_suites: ["general-tests"],
95}