1# Copyright (c) 2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15 16if (host_os != "linux" || host_cpu != "arm64") { 17 ohos_cargo_crate("lib") { 18 crate_name = "clap" 19 crate_type = "rlib" 20 crate_root = "src/lib.rs" 21 22 sources = [ "src/lib.rs" ] 23 edition = "2021" 24 cargo_pkg_version = "4.1.13" 25 cargo_pkg_name = "clap" 26 cargo_pkg_description = "A simple to use, efficient, and full-featured Command Line Argument Parser" 27 deps = [ 28 "//third_party/rust/crates/bitflags:lib", 29 "//third_party/rust/crates/clap/clap_derive:lib(${host_toolchain})", 30 "//third_party/rust/crates/clap/clap_lex:lib", 31 "//third_party/rust/crates/is-terminal:lib", 32 "//third_party/rust/crates/once_cell:lib", 33 "//third_party/rust/crates/strsim-rs:lib", 34 "//third_party/rust/crates/termcolor:lib", 35 ] 36 features = [ 37 "color", 38 "error-context", 39 "help", 40 "std", 41 "suggestions", 42 "usage", 43 "derive", 44 ] 45 } 46 47 ohos_cargo_crate("stdio_fixture") { 48 crate_type = "bin" 49 crate_root = "src/bin/stdio-fixture.rs" 50 51 sources = [ "src/bin/stdio-fixture.rs" ] 52 edition = "2021" 53 cargo_pkg_version = "4.1.13" 54 cargo_pkg_name = "clap" 55 cargo_pkg_description = "A simple to use, efficient, and full-featured Command Line Argument Parser" 56 deps = [ 57 "//third_party/rust/crates/bitflags:lib", 58 "//third_party/rust/crates/clap:lib", 59 "//third_party/rust/crates/clap/clap_derive:lib(${host_toolchain})", 60 "//third_party/rust/crates/clap/clap_lex:lib", 61 "//third_party/rust/crates/is-terminal:lib", 62 "//third_party/rust/crates/once_cell:lib", 63 "//third_party/rust/crates/strsim-rs:lib", 64 "//third_party/rust/crates/termcolor:lib", 65 ] 66 features = [ 67 "color", 68 "error-context", 69 "help", 70 "std", 71 "suggestions", 72 "usage", 73 "derive", 74 ] 75 } 76} 77