• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/ark_config.gni")
15
16config("arkziparchive_config") {
17  include_dirs = [
18    "$ark_root/libziparchive",
19    "$ark_root/libpandabase",
20  ]
21
22  include_dirs += [
23    "//third_party/zlib",
24    "//third_party/zlib/contrib/minizip",
25  ]
26}
27
28source_set("libarkziparchive_static") {
29  sources = [ "zip_archive.cpp" ]
30
31  public_configs = [
32    ":arkziparchive_config",
33    "$ark_root:ark_config",
34    "$ark_root/libpandabase:arkbase_public_config",
35    sdk_libc_secshared_config,
36  ]
37
38  deps = [
39    "$ark_root/libpandabase:libarkbase_static",
40    sdk_libc_secshared_dep,
41  ]
42
43  if (ark_standalone_build || is_arkui_x) {
44    deps += [ "$ark_third_party_root/zlib:libz" ]
45  } else {
46    deps += [ "$ark_third_party_root/zlib:shared_libz" ]
47  }
48}
49
50ohos_shared_library("libarkziparchive") {
51  stack_protector_ret = false
52  deps = [ ":libarkziparchive_static" ]
53
54  if (!is_standard_system) {
55    relative_install_dir = "ark"
56  }
57  if (!is_mingw && !is_mac) {
58    output_extension = "so"
59  }
60
61  part_name = "runtime_core"
62  subsystem_name = "arkcompiler"
63}
64
65source_set("libarkziparchive_frontend_set_static") {
66  sources = [ "zip_archive.cpp" ]
67
68  public_configs = [
69    ":arkziparchive_config",
70    "$ark_root:ark_config",
71    "$ark_root/libpandabase:arkbase_public_config",
72    sdk_libc_secshared_config,
73  ]
74
75  deps = [
76    "$ark_root/libpandabase:libarkbase_frontend_static",
77    sdk_libc_secshared_dep,
78  ]
79
80  deps += [ "$ark_third_party_root/zlib:libz" ]
81}
82
83ohos_static_library("libarkziparchive_frontend_static") {
84  stack_protector_ret = false
85  deps = [ ":libarkziparchive_frontend_set_static" ]
86
87  part_name = "runtime_core"
88  subsystem_name = "arkcompiler"
89}
90