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