• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
16ohos_cargo_crate("lib") {
17  crate_name = "clap"
18  crate_type = "rlib"
19  crate_root = "src/lib.rs"
20
21  sources = [ "src/lib.rs" ]
22  edition = "2021"
23  cargo_pkg_version = "4.1.13"
24  cargo_pkg_name = "clap"
25  cargo_pkg_description = "A simple to use, efficient, and full-featured Command Line Argument Parser"
26  deps = [
27    "//third_party/rust/crates/bitflags:lib",
28    "//third_party/rust/crates/clap/clap_derive:lib(${host_toolchain})",
29    "//third_party/rust/crates/clap/clap_lex:lib",
30    "//third_party/rust/crates/is-terminal:lib",
31    "//third_party/rust/crates/once_cell:lib",
32    "//third_party/rust/crates/strsim-rs:lib",
33    "//third_party/rust/crates/termcolor:lib",
34  ]
35  features = [
36    "color",
37    "error-context",
38    "help",
39    "std",
40    "suggestions",
41    "usage",
42    "derive",
43  ]
44}
45
46ohos_cargo_crate("stdio_fixture") {
47  crate_type = "bin"
48  crate_root = "src/bin/stdio-fixture.rs"
49
50  sources = [ "src/bin/stdio-fixture.rs" ]
51  edition = "2021"
52  cargo_pkg_version = "4.1.13"
53  cargo_pkg_name = "clap"
54  cargo_pkg_description = "A simple to use, efficient, and full-featured Command Line Argument Parser"
55  deps = [
56    "//third_party/rust/crates/bitflags:lib",
57    "//third_party/rust/crates/clap:lib",
58    "//third_party/rust/crates/clap/clap_derive:lib(${host_toolchain})",
59    "//third_party/rust/crates/clap/clap_lex:lib",
60    "//third_party/rust/crates/is-terminal:lib",
61    "//third_party/rust/crates/once_cell:lib",
62    "//third_party/rust/crates/strsim-rs:lib",
63    "//third_party/rust/crates/termcolor:lib",
64  ]
65  features = [
66    "color",
67    "error-context",
68    "help",
69    "std",
70    "suggestions",
71    "usage",
72    "derive",
73  ]
74}
75