Max Bires | 44c7881 | 2020-04-10 09:38:23 -0700 | [diff] [blame] | 1 | // 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 Badour | 382930d | 2021-02-12 20:14:08 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["external_libcppbor_license"], |
| 17 | } |
| 18 | |
| 19 | // Added automatically by a large-scale-change |
| 20 | // See: http://go/android-license-faq |
| 21 | license { |
| 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 Willden | 03990c2 | 2020-11-24 19:05:09 -0700 | [diff] [blame] | 32 | cc_defaults { |
| 33 | name: "libcppbor_defaults", |
| 34 | cflags: [ |
| 35 | "-Wall", |
| 36 | "-Wextra", |
| 37 | "-Werror", |
| 38 | ], |
| 39 | } |
| 40 | |
Max Bires | 44c7881 | 2020-04-10 09:38:23 -0700 | [diff] [blame] | 41 | cc_library { |
| 42 | name: "libcppbor_external", |
Shawn Willden | 03990c2 | 2020-11-24 19:05:09 -0700 | [diff] [blame] | 43 | defaults: [ |
| 44 | "libcppbor_defaults", |
| 45 | ], |
Max Bires | 44c7881 | 2020-04-10 09:38:23 -0700 | [diff] [blame] | 46 | 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 Willden | 0f9cd2d | 2020-11-20 00:35:10 -0700 | [diff] [blame] | 57 | "libcrypto", |
Max Bires | 44c7881 | 2020-04-10 09:38:23 -0700 | [diff] [blame] | 58 | ] |
| 59 | } |
| 60 | |
| 61 | cc_test { |
| 62 | name: "cppbor_test_external", |
Shawn Willden | 03990c2 | 2020-11-24 19:05:09 -0700 | [diff] [blame] | 63 | defaults: [ |
| 64 | "libcppbor_defaults", |
| 65 | ], |
Max Bires | 44c7881 | 2020-04-10 09:38:23 -0700 | [diff] [blame] | 66 | srcs: [ |
| 67 | "tests/cppbor_test.cpp" |
| 68 | ], |
| 69 | shared_libs: [ |
Shawn Willden | 0f9cd2d | 2020-11-20 00:35:10 -0700 | [diff] [blame] | 70 | "libcppbor_external", |
Max Bires | 44c7881 | 2020-04-10 09:38:23 -0700 | [diff] [blame] | 71 | "libbase", |
| 72 | ], |
| 73 | static_libs: [ |
| 74 | "libgmock", |
| 75 | ], |
| 76 | test_suites: ["general-tests"], |
| 77 | } |
| 78 | |
| 79 | cc_test_host { |
| 80 | name: "cppbor_host_test_external", |
Shawn Willden | 03990c2 | 2020-11-24 19:05:09 -0700 | [diff] [blame] | 81 | defaults: [ |
| 82 | "libcppbor_defaults", |
| 83 | ], |
Max Bires | 44c7881 | 2020-04-10 09:38:23 -0700 | [diff] [blame] | 84 | srcs: [ |
| 85 | "tests/cppbor_test.cpp" |
| 86 | ], |
| 87 | shared_libs: [ |
Shawn Willden | 0f9cd2d | 2020-11-20 00:35:10 -0700 | [diff] [blame] | 88 | "libcppbor_external", |
Max Bires | 44c7881 | 2020-04-10 09:38:23 -0700 | [diff] [blame] | 89 | "libbase", |
| 90 | ], |
| 91 | static_libs: [ |
| 92 | "libgmock", |
| 93 | ], |
| 94 | test_suites: ["general-tests"], |
| 95 | } |