• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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("//build/ohos.gni")
15import("//foundation/ability/ability_runtime/ability_runtime.gni")
16
17config("string_utils_config") {
18  include_dirs = [ "utils/include" ]
19}
20
21ohos_source_set("string_utils") {
22  if (is_mingw) {
23    defines = [ "WINDOWS_PLATFORM" ]
24  } else {
25    defines = [ "MAC_PLATFORM" ]
26  }
27
28  sources = [ "utils/src/file_path_utils.cpp" ]
29
30  cflags = []
31  if (target_cpu == "arm") {
32    cflags += [ "-DBINDER_IPC_32BIT" ]
33  }
34
35  public_configs = [
36    ":string_utils_config",
37    "${ability_runtime_services_path}/common:common_config",
38  ]
39
40  subsystem_name = "ability"
41  part_name = "ability_runtime"
42}
43
44config("ability_extractor_config") {
45  include_dirs = [
46    "utils/include",
47    "//third_party/zlib/contrib/minizip",
48    "//third_party/zlib",
49  ]
50}
51
52ohos_source_set("runtime_extractor") {
53  sources = [
54    "utils/src/runtime_extractor.cpp",
55    "utils/src/zip_file.cpp",
56  ]
57
58  cflags = []
59  if (target_cpu == "arm") {
60    cflags += [ "-DBINDER_IPC_32BIT" ]
61  }
62
63  deps = [ ":string_utils" ]
64
65  public_configs = [
66    ":ability_extractor_config",
67    "${ability_runtime_services_path}/common:common_config",
68  ]
69
70  external_deps = [
71    "c_utils:utils",
72    "hiviewdfx_hilog_native:libhilog",
73  ]
74
75  subsystem_name = "ability"
76  part_name = "ability_runtime"
77}
78