• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (c) 2022 Huawei Device Co., Ltd.
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15
16import("//build/ohos.gni")
17import("//foundation/ability/ability_runtime/ability_runtime.gni")
18
19group("ams_common_target") {
20  deps = [
21    ":event_report",
22    ":perm_verification",
23    ":task_handler_wrap",
24  ]
25}
26
27config("common_config") {
28  visibility = [ ":*" ]
29  visibility += [
30    "${ability_runtime_innerkits_path}/*",
31    "${ability_runtime_napi_path}/*",
32    "${ability_runtime_native_path}/ability/native/*",
33    "${ability_runtime_path}/frameworks/simulator/ability_simulator/*",
34    "${ability_runtime_path}/tools/aa/*",
35    "${ability_runtime_services_path}/common/*",
36    "${ability_runtime_services_path}/quickfixmgr/*",
37    "${ability_runtime_services_path}/uripermmgr/*",
38    "${ability_runtime_test_path}/*",
39    "${hiebpf_path}/*",
40    "${power_manager_path}/utils/*",
41    "${request_path}/common/*",
42  ]
43  include_dirs = [
44    "include",
45    "${ability_runtime_innerkits_path}/ability_manager/include",
46  ]
47  cflags = []
48  if (target_cpu == "arm") {
49    cflags += [ "-DBINDER_IPC_32BIT" ]
50  }
51}
52
53#build so
54ohos_shared_library("perm_verification") {
55  public_configs = [ ":common_config" ]
56
57  sources = [ "src/permission_verification.cpp" ]
58
59  external_deps = [
60    "ability_base:want",
61    "access_token:libaccesstoken_sdk",
62    "access_token:libtokenid_sdk",
63    "c_utils:utils",
64    "hilog:libhilog",
65    "ipc:ipc_core",
66  ]
67
68  subsystem_name = "ability"
69  innerapi_tags = [ "platformsdk_indirect" ]
70  part_name = "ability_runtime"
71}
72
73ohos_shared_library("event_report") {
74  public_configs = [ ":common_config" ]
75
76  sources = [ "src/event_report.cpp" ]
77
78  external_deps = [
79    "hilog:libhilog",
80    "hisysevent:libhisysevent",
81  ]
82
83  innerapi_tags = [ "platformsdk_indirect" ]
84  subsystem_name = "ability"
85  part_name = "ability_runtime"
86}
87
88ohos_shared_library("task_handler_wrap") {
89  public_configs = [ ":common_config" ]
90  include_dirs = [ "include" ]
91
92  sources = [
93    "src/event_handler_wrap.cpp",
94    "src/ffrt_task_handler_wrap.cpp",
95    "src/queue_task_handler_wrap.cpp",
96    "src/task_handler_wrap.cpp",
97  ]
98
99  external_deps = [
100    "ffrt:libffrt",
101    "hilog:libhilog",
102  ]
103
104  subsystem_name = "ability"
105  part_name = "ability_runtime"
106}
107