• 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) {
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  deps = [ ":libarkziparchive_static" ]
52
53  if (!is_standard_system) {
54    relative_install_dir = "ark"
55  }
56  if (!is_mingw && !is_mac) {
57    output_extension = "so"
58  }
59
60  part_name = "runtime_core"
61  subsystem_name = "arkcompiler"
62}
63
64source_set("libarkziparchive_frontend_set_static") {
65  sources = [ "zip_archive.cpp" ]
66
67  public_configs = [
68    ":arkziparchive_config",
69    "$ark_root:ark_config",
70    "$ark_root/libpandabase:arkbase_public_config",
71    sdk_libc_secshared_config,
72  ]
73
74  deps = [
75    "$ark_root/libpandabase:libarkbase_frontend_static",
76    sdk_libc_secshared_dep,
77  ]
78
79  if (!ark_standalone_build) {
80    deps += [ "$ark_third_party_root/zlib:libz" ]
81  } else {
82    deps += [ "$ark_third_party_root/zlib:libz" ]
83  }
84}
85
86ohos_static_library("libarkziparchive_frontend_static") {
87  deps = [ ":libarkziparchive_frontend_set_static" ]
88
89  part_name = "runtime_core"
90  subsystem_name = "arkcompiler"
91}
92