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_win) { 61 output_extension = "dll" 62 } else { 63 output_extension = "so" 64 } 65 part_name = ark_part_name 66 subsystem_name = "$ark_subsystem_name" 67} 68 69ohos_source_set("libarktsziparchive_frontend_set_static") { 70 sources = [ "zip_archive.cpp" ] 71 72 public_configs = [ 73 ":arkziparchive_config", 74 "$ark_root:ark_config", 75 "$ark_root/libpandabase:arkbase_public_config", 76 ] 77 78 deps = [ "$ark_root/libpandabase:logger_enum_gen_h" ] 79 80 if (ark_static_standalone_build || ark_standalone_build) { 81 public_configs += [ zlib_public_config ] 82 } 83 84 if (ark_static_standalone_build) { 85 deps += [ 86 sdk_libc_secshared_dep, 87 zlib_dep, 88 ] 89 } 90 91 external_deps = [ 92 sdk_libc_secshared_dep, 93 zlib_dep, 94 ] 95 96 part_name = ark_part_name 97 subsystem_name = "$ark_subsystem_name" 98} 99 100ohos_static_library("libarktsziparchive_frontend_static") { 101 deps = [ ":libarktsziparchive_frontend_set_static" ] 102 part_name = ark_part_name 103 subsystem_name = ark_subsystem_name 104} 105