# Copyright (C) 2022 Huawei Device Co., Ltd. # 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/ohos.gni") config("upload_lib_config") { visibility = [ ":*" ] include_dirs = [ "include", "//third_party/curl/include", "//third_party/openssl/include", ] ldflags = [ "-Wl,--exclude-libs,libcrypto_static.a" ] ldflags += [ "-Wl,--exclude-libs,libcurl.a" ] cflags_cc = [ "-fvisibility=hidden" ] cflags = [ "-DOPENSSL_ARM64_PLATFORM" ] } config("upload_lib_public_config") { visibility = [] include_dirs = [ "include", "//third_party/curl/include", "//third_party/openssl/include", "//base/miscservices/time/interfaces/innerkits/include", "./", ] } ohos_shared_library("upload_lib") { sources = [ "src/curl_adp.cpp", "src/module_init.cpp", "src/obtain_file.cpp", "src/upload_task.cpp", "src/upload_timer_info.cpp", ] include_dirs = [ "//third_party/curl/include", "//third_party/openssl/include", ] configs = [ ":upload_lib_config" ] deps = [ "//foundation/aafwk/standard/frameworks/kits/ability/native:abilitykit_native", "//foundation/aafwk/standard/interfaces/innerkits/uri:zuri", "//foundation/aafwk/standard/interfaces/innerkits/want:want", "//third_party/curl/:curl", ] external_deps = [ "ability_base:zuri", "ability_runtime:ability_manager", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "time_native:time_service", ] public_configs = [ ":upload_lib_public_config" ] subsystem_name = "miscservices" part_name = "request" }