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 target: { 60 windows: { 61 enabled: true, 62 }, 63 }, 64} 65 66cc_test { 67 name: "cppbor_test_external", 68 defaults: [ 69 "libcppbor_defaults", 70 ], 71 srcs: [ 72 "tests/cppbor_test.cpp" 73 ], 74 shared_libs: [ 75 "libcppbor_external", 76 "libbase", 77 ], 78 static_libs: [ 79 "libgmock", 80 ], 81 test_suites: ["general-tests"], 82} 83 84cc_test_host { 85 name: "cppbor_host_test_external", 86 defaults: [ 87 "libcppbor_defaults", 88 ], 89 srcs: [ 90 "tests/cppbor_test.cpp" 91 ], 92 shared_libs: [ 93 "libcppbor_external", 94 "libbase", 95 ], 96 static_libs: [ 97 "libgmock", 98 ], 99 test_suites: ["general-tests"], 100} 101