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 (!defined(global_parts_info) ||
17    defined(global_parts_info.commonlibrary_ylong_http)) {
18  has_commonlibrary_ylong_http = true
19} else {
20  has_commonlibrary_ylong_http = false
21}
22
23ohos_rust_shared_library("ylong_http_client") {
24  crate_name = "ylong_http_client"
25  crate_type = "dylib"
26  crate_root = "src/lib.rs"
27
28  install_images = [ system_base_dir ]
29  subsystem_name = "communication"
30  part_name = "netstack"
31
32  sources = [ "src/lib.rs" ]
33  edition = "2021"
34  clippy_lints = "none"
35  if (has_commonlibrary_ylong_http) {
36    external_deps = [ "ylong_http:ylong_http_client_inner" ]
37  }
38  features = [
39    "default",
40    "ylong_impl",
41  ]
42}
43