1# Copyright (c) 2021-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("//arkcompiler/runtime_core/static_core/ark_config.gni") 15import("//build/ohos.gni") 16 17config("arkziparchive_config") { 18 include_dirs = [ 19 "$ark_root/libziparchive", 20 "$ark_root/libpandabase", 21 ] 22 23 if (!ark_standalone_build) { 24 include_dirs += [ 25 "//third_party/zlib", 26 "//third_party/zlib/contrib/minizip", 27 ] 28 } else { 29 include_dirs += [ 30 "$ark_third_party_root/zlib", 31 "$ark_third_party_root/zlib/contrib/minizip", 32 ] 33 } 34} 35 36source_set("libarkziparchive_static") { 37 sources = [ "zip_archive.cpp" ] 38 39 public_configs = [ 40 ":arkziparchive_config", 41 "$ark_root:ark_config", 42 "$ark_root/libpandabase:arkbase_public_config", 43 sdk_libc_secshared_config, 44 ] 45 46 deps = [ 47 "$ark_root/libpandabase:libarktsbase", 48 sdk_libc_secshared_dep, 49 ] 50 51 if (!ark_standalone_build) { 52 deps += [ "//third_party/zlib:libz" ] 53 } else { 54 deps += [ "$ark_third_party_root/zlib:libz" ] 55 } 56} 57 58ohos_shared_library("libarktsziparchive") { 59 deps = [ ":libarkziparchive_static" ] 60 61 if (!is_mingw && !is_mac) { 62 output_extension = "so" 63 } 64 part_name = ark_part_name 65 subsystem_name = "$ark_subsystem_name" 66} 67 68source_set("libarkziparchive_frontend_set_static") { 69 sources = [ "zip_archive.cpp" ] 70 71 public_configs = [ 72 ":arkziparchive_config", 73 "$ark_root:ark_config", 74 "$ark_root/libpandabase:arkbase_public_config", 75 sdk_libc_secshared_config, 76 ] 77 78 deps = [ 79 "$ark_root/libpandabase:logger_enum_gen_h", 80 sdk_libc_secshared_dep, 81 ] 82 83 if (!ark_standalone_build) { 84 deps += [ "//third_party/zlib:libz" ] 85 } else { 86 deps += [ "$ark_third_party_root/zlib:libz" ] 87 } 88} 89 90ohos_static_library("libarktsziparchive_frontend_static") { 91 deps = [ ":libarkziparchive_frontend_set_static" ] 92 part_name = ark_part_name 93 subsystem_name = ark_subsystem_name 94} 95