• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 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
16config("upload_lib_config") {
17  visibility = [ ":*" ]
18  include_dirs = [
19    "include",
20    "//third_party/curl/include",
21    "//third_party/openssl/include",
22  ]
23  ldflags = [ "-Wl,--exclude-libs,libcrypto_static.a" ]
24  ldflags += [ "-Wl,--exclude-libs,libcurl.a" ]
25
26  cflags_cc = [ "-fvisibility=hidden" ]
27  cflags = [ "-DOPENSSL_ARM64_PLATFORM" ]
28}
29
30config("upload_lib_public_config") {
31  visibility = []
32  include_dirs = [
33    "include",
34    "//third_party/curl/include",
35    "//third_party/openssl/include",
36    "//base/miscservices/time/interfaces/innerkits/include",
37    "./",
38  ]
39}
40
41ohos_shared_library("upload_lib") {
42  sources = [
43    "src/curl_adp.cpp",
44    "src/module_init.cpp",
45    "src/obtain_file.cpp",
46    "src/upload_task.cpp",
47    "src/upload_timer_info.cpp",
48  ]
49  include_dirs = [
50    "//third_party/curl/include",
51    "//third_party/openssl/include",
52  ]
53
54  configs = [ ":upload_lib_config" ]
55
56  deps = [
57    "//foundation/aafwk/standard/frameworks/kits/ability/native:abilitykit_native",
58    "//foundation/aafwk/standard/interfaces/innerkits/uri:zuri",
59    "//foundation/aafwk/standard/interfaces/innerkits/want:want",
60    "//third_party/curl/:curl",
61  ]
62
63  external_deps = [
64    "ability_base:zuri",
65    "ability_runtime:ability_manager",
66    "hiviewdfx_hilog_native:libhilog",
67    "ipc:ipc_core",
68    "time_native:time_service",
69  ]
70
71  public_configs = [ ":upload_lib_public_config" ]
72  subsystem_name = "miscservices"
73  part_name = "request"
74}
75