1b1994897Sopenharmony_ci# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 2b1994897Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3b1994897Sopenharmony_ci# you may not use this file except in compliance with the License. 4b1994897Sopenharmony_ci# You may obtain a copy of the License at 5b1994897Sopenharmony_ci# 6b1994897Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7b1994897Sopenharmony_ci# 8b1994897Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9b1994897Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10b1994897Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11b1994897Sopenharmony_ci# See the License for the specific language governing permissions and 12b1994897Sopenharmony_ci# limitations under the License. 13b1994897Sopenharmony_ci 14b1994897Sopenharmony_ciimport("//arkcompiler/runtime_core/ark_config.gni") 15b1994897Sopenharmony_ci 16b1994897Sopenharmony_ciconfig("arkziparchive_config") { 17b1994897Sopenharmony_ci include_dirs = [ 18b1994897Sopenharmony_ci "$ark_root/libziparchive", 19b1994897Sopenharmony_ci "$ark_root/libpandabase", 20b1994897Sopenharmony_ci ] 21b1994897Sopenharmony_ci} 22b1994897Sopenharmony_ci 23b1994897Sopenharmony_ciohos_source_set("libarkziparchive_static") { 24b1994897Sopenharmony_ci sources = [ "zip_archive.cpp" ] 25b1994897Sopenharmony_ci 26b1994897Sopenharmony_ci public_configs = [ 27b1994897Sopenharmony_ci ":arkziparchive_config", 28b1994897Sopenharmony_ci "$ark_root:ark_config", 29b1994897Sopenharmony_ci "$ark_root/libpandabase:arkbase_public_config", 30b1994897Sopenharmony_ci ] 31b1994897Sopenharmony_ci 32b1994897Sopenharmony_ci deps = [ "$ark_root/libpandabase:libarkbase_static" ] 33b1994897Sopenharmony_ci 34b1994897Sopenharmony_ci if (is_arkui_x) { 35b1994897Sopenharmony_ci deps += [ 36b1994897Sopenharmony_ci "$ark_third_party_root/bounds_checking_function:libsec_static", 37b1994897Sopenharmony_ci "$ark_third_party_root/zlib:libz", 38b1994897Sopenharmony_ci ] 39b1994897Sopenharmony_ci } else if (ark_standalone_build) { 40b1994897Sopenharmony_ci external_deps = [ 41b1994897Sopenharmony_ci "zlib:shared_libz", 42b1994897Sopenharmony_ci sdk_libc_secshared_dep, 43b1994897Sopenharmony_ci ] 44b1994897Sopenharmony_ci } else { 45b1994897Sopenharmony_ci public_external_deps = [ 46b1994897Sopenharmony_ci "zlib:shared_libz", 47b1994897Sopenharmony_ci sdk_libc_secshared_dep, 48b1994897Sopenharmony_ci ] 49b1994897Sopenharmony_ci } 50b1994897Sopenharmony_ci 51b1994897Sopenharmony_ci if (enable_hilog) { 52b1994897Sopenharmony_ci public_external_deps += [ "hilog:libhilog" ] 53b1994897Sopenharmony_ci } 54b1994897Sopenharmony_ci 55b1994897Sopenharmony_ci part_name = "runtime_core" 56b1994897Sopenharmony_ci subsystem_name = "arkcompiler" 57b1994897Sopenharmony_ci} 58b1994897Sopenharmony_ci 59b1994897Sopenharmony_ciohos_shared_library("libarkziparchive") { 60b1994897Sopenharmony_ci stack_protector_ret = false 61b1994897Sopenharmony_ci deps = [ ":libarkziparchive_static" ] 62b1994897Sopenharmony_ci 63b1994897Sopenharmony_ci if (!is_standard_system) { 64b1994897Sopenharmony_ci relative_install_dir = "ark" 65b1994897Sopenharmony_ci } 66b1994897Sopenharmony_ci if (!is_mingw && !is_mac) { 67b1994897Sopenharmony_ci output_extension = "so" 68b1994897Sopenharmony_ci } 69b1994897Sopenharmony_ci 70b1994897Sopenharmony_ci part_name = "runtime_core" 71b1994897Sopenharmony_ci subsystem_name = "arkcompiler" 72b1994897Sopenharmony_ci} 73b1994897Sopenharmony_ci 74b1994897Sopenharmony_ciohos_source_set("libarkziparchive_frontend_set_static") { 75b1994897Sopenharmony_ci sources = [ "zip_archive.cpp" ] 76b1994897Sopenharmony_ci 77b1994897Sopenharmony_ci public_configs = [ 78b1994897Sopenharmony_ci ":arkziparchive_config", 79b1994897Sopenharmony_ci "$ark_root:ark_config", 80b1994897Sopenharmony_ci "$ark_root/libpandabase:arkbase_public_config", 81b1994897Sopenharmony_ci ] 82b1994897Sopenharmony_ci 83b1994897Sopenharmony_ci deps = [ "$ark_root/libpandabase:libarkbase_frontend_static" ] 84b1994897Sopenharmony_ci 85b1994897Sopenharmony_ci if (is_arkui_x) { 86b1994897Sopenharmony_ci deps += [ 87b1994897Sopenharmony_ci "$ark_third_party_root/bounds_checking_function:libsec_static", 88b1994897Sopenharmony_ci "$ark_third_party_root/zlib:libz", 89b1994897Sopenharmony_ci ] 90b1994897Sopenharmony_ci } else { 91b1994897Sopenharmony_ci external_deps = [ 92b1994897Sopenharmony_ci "zlib:libz", 93b1994897Sopenharmony_ci sdk_libc_secshared_dep, 94b1994897Sopenharmony_ci ] 95b1994897Sopenharmony_ci } 96b1994897Sopenharmony_ci 97b1994897Sopenharmony_ci part_name = "runtime_core" 98b1994897Sopenharmony_ci subsystem_name = "arkcompiler" 99b1994897Sopenharmony_ci} 100b1994897Sopenharmony_ci 101b1994897Sopenharmony_ciohos_static_library("libarkziparchive_frontend_static") { 102b1994897Sopenharmony_ci stack_protector_ret = false 103b1994897Sopenharmony_ci deps = [ ":libarkziparchive_frontend_set_static" ] 104b1994897Sopenharmony_ci 105b1994897Sopenharmony_ci part_name = "runtime_core" 106b1994897Sopenharmony_ci subsystem_name = "arkcompiler" 107b1994897Sopenharmony_ci} 108