• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2025 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/ark_config.gni")
15
16config("arkziparchive_config") {
17  include_dirs = [
18    "$ark_root/libziparchive",
19    "$ark_root/libpandabase",
20  ]
21}
22
23ohos_static_library("libarkziparchive_static") {
24  sources = [ "zip_archive.cpp" ]
25
26  public_configs = [ ":arkziparchive_config" ]
27  configs = [
28    "$ark_root:ark_config",
29    "$ark_root/libpandabase:arkbase_public_config",
30  ]
31
32  deps = [ "$ark_root/libpandabase:libarkbase_static" ]
33
34  if (is_arkui_x) {
35    deps += [
36      "$ark_third_party_root/bounds_checking_function:libsec_static",
37      "$ark_third_party_root/zlib:libz",
38    ]
39  } else if (ark_standalone_build) {
40    external_deps = [
41      "zlib:shared_libz",
42      sdk_libc_secshared_dep,
43    ]
44  } else {
45    public_external_deps = [
46      "zlib:shared_libz",
47      sdk_libc_secshared_dep,
48    ]
49  }
50
51  if (enable_hilog) {
52    public_external_deps += [ "hilog:libhilog" ]
53  }
54
55  part_name = "runtime_core"
56  subsystem_name = "arkcompiler"
57}
58
59ohos_shared_library("libarkziparchive") {
60  stack_protector_ret = false
61  deps = [ ":libarkziparchive_static" ]
62
63  if (!is_standard_system) {
64    relative_install_dir = "ark"
65  }
66  if (!is_mingw && !is_mac) {
67    output_extension = "so"
68  }
69
70  part_name = "runtime_core"
71  subsystem_name = "arkcompiler"
72}
73
74ohos_source_set("libarkziparchive_frontend_set_static") {
75  sources = [ "zip_archive.cpp" ]
76
77  public_configs = [
78    ":arkziparchive_config",
79    "$ark_root:ark_config",
80    "$ark_root/libpandabase:arkbase_public_config",
81  ]
82
83  deps = [ "$ark_root/libpandabase:libarkbase_frontend_static" ]
84
85  if (is_arkui_x) {
86    deps += [
87      "$ark_third_party_root/bounds_checking_function:libsec_static",
88      "$ark_third_party_root/zlib:libz",
89    ]
90  } else {
91    external_deps = [
92      "zlib:libz",
93      sdk_libc_secshared_dep,
94    ]
95    if (enable_hilog && defined(ohos_indep_compiler_enable) &&
96        ohos_indep_compiler_enable) {
97      external_deps += [ "hilog:libhilog" ]
98    }
99  }
100
101  part_name = "runtime_core"
102  subsystem_name = "arkcompiler"
103}
104
105ohos_static_library("libarkziparchive_frontend_static") {
106  stack_protector_ret = false
107  if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) {
108    deps = [ ":libarkziparchive_static" ]
109  } else {
110    deps = [ ":libarkziparchive_frontend_set_static" ]
111  }
112
113  part_name = "runtime_core"
114  subsystem_name = "arkcompiler"
115}
116