| # Copyright (c) 2020 Project CHIP Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| import("//build_overrides/chip.gni") |
| import("//build_overrides/nlassert.gni") |
| |
| action("gen_asn1oid") { |
| script = "gen_asn1oid.py" |
| asn1oid_file = "${root_gen_dir}/include/asn1/ASN1OID.h" |
| outputs = [ asn1oid_file ] |
| args = [ "--output_file=" + rebase_path(asn1oid_file, root_build_dir) ] |
| } |
| |
| source_set("asn1oid_header") { |
| sources = get_target_outputs(":gen_asn1oid") |
| |
| deps = [ ":gen_asn1oid" ] |
| } |
| |
| static_library("asn1") { |
| output_name = "libASN1" |
| |
| sources = [ |
| "ASN1.h", |
| "ASN1Config.h", |
| "ASN1Error.cpp", |
| "ASN1Error.h", |
| "ASN1Macros.h", |
| "ASN1OID.cpp", |
| "ASN1Reader.cpp", |
| "ASN1Time.cpp", |
| "ASN1Writer.cpp", |
| ] |
| |
| cflags = [ "-Wconversion" ] |
| |
| public_deps = [ |
| ":asn1oid_header", |
| "${chip_root}/src/lib/core", |
| "${chip_root}/src/lib/support", |
| "${nlassert_root}:nlassert", |
| ] |
| |
| public_configs = [ |
| "${chip_root}/src:includes", |
| "${chip_root}/src/system:system_config", |
| ] |
| } |