• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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("//ark/runtime_core/ark_config.gni")
15import("//build/ohos.gni")
16
17config("arkziparchive_config") {
18  include_dirs = [
19    "$ark_root/libziparchive",
20    "$ark_root/libpandabase",
21  ]
22
23  if (!ark_standalone_build) {
24    include_dirs += [
25      "//third_party/zlib",
26      "//third_party/zlib/contrib/minizip",
27    ]
28  } else {
29    include_dirs += [ "$ark_third_party_root/miniz" ]
30  }
31}
32
33ohos_shared_library("libarkziparchive") {
34  sources = [ "zip_archive.cpp" ]
35
36  configs = [
37    ":arkziparchive_config",
38    "$ark_root:ark_config",
39    sdk_libc_secshared_config,
40  ]
41
42  deps = [
43    "$ark_root/libpandabase:libarkbase",
44    sdk_libc_secshared_dep,
45  ]
46
47  if (!ark_standalone_build) {
48    deps += [ "//third_party/zlib:libz" ]
49  } else {
50    deps += [ "$ark_third_party_root/miniz:libminiz" ]
51  }
52  if (!is_standard_system) {
53    relative_install_dir = "ark"
54  }
55  output_extension = "so"
56  subsystem_name = "ark"
57}
58
59ohos_static_library("libarkziparchive_frontend_static") {
60  sources = [ "zip_archive.cpp" ]
61
62  configs = [
63    ":arkziparchive_config",
64    "$ark_root:ark_config",
65    sdk_libc_secshared_config,
66  ]
67
68  deps = [
69    "$ark_root/libpandabase:libarkbase_frontend_static",
70    sdk_libc_secshared_dep,
71  ]
72
73  if (!ark_standalone_build) {
74    deps += [ "//third_party/zlib:libz" ]
75  } else {
76    deps += [ "$ark_third_party_root/miniz:libminiz" ]
77  }
78}
79