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 15package { 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 32cc_defaults { 33 name: "libcppbor_defaults", 34 cflags: [ 35 "-Wall", 36 "-Wextra", 37 "-Werror", 38 ], 39} 40 41cc_library { 42 name: "libcppbor_external", 43 defaults: [ 44 "libcppbor_defaults", 45 ], 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", 57 "libcrypto", 58 ] 59} 60 61cc_test { 62 name: "cppbor_test_external", 63 defaults: [ 64 "libcppbor_defaults", 65 ], 66 srcs: [ 67 "tests/cppbor_test.cpp" 68 ], 69 shared_libs: [ 70 "libcppbor_external", 71 "libbase", 72 ], 73 static_libs: [ 74 "libgmock", 75 ], 76 test_suites: ["general-tests"], 77} 78 79cc_test_host { 80 name: "cppbor_host_test_external", 81 defaults: [ 82 "libcppbor_defaults", 83 ], 84 srcs: [ 85 "tests/cppbor_test.cpp" 86 ], 87 shared_libs: [ 88 "libcppbor_external", 89 "libbase", 90 ], 91 static_libs: [ 92 "libgmock", 93 ], 94 test_suites: ["general-tests"], 95} 96