• 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("//build/ohos.gni")
15import("//foundation/ability/ability_runtime/ability_runtime.gni")
16
17config("appmgr_config") {
18  include_dirs = [
19    "include",
20    "${ability_runtime_services_path}/common/include",
21    "${appspawn_path}/interfaces/innerkits/include",
22    "${ability_runtime_path}/tools/aa/include",
23  ]
24}
25
26group("appms_target") {
27  deps = [ ":libappms" ]
28}
29
30ohos_shared_library("libappms") {
31  sources = [
32    "src/ability_running_record.cpp",
33    "src/ams_mgr_scheduler.cpp",
34    "src/app_death_recipient.cpp",
35    "src/app_lifecycle_deal.cpp",
36    "src/app_mgr_service.cpp",
37    "src/app_mgr_service_event_handler.cpp",
38    "src/app_mgr_service_inner.cpp",
39    "src/app_process_manager.cpp",
40    "src/app_running_manager.cpp",
41    "src/app_running_record.cpp",
42    "src/app_spawn_client.cpp",
43    "src/app_spawn_msg_wrapper.cpp",
44    "src/app_spawn_socket.cpp",
45    "src/app_state_observer_manager.cpp",
46    "src/module_running_record.cpp",
47    "src/quick_fix_callback_with_record.cpp",
48    "src/remote_client_manager.cpp",
49    "src/window_focus_changed_listener.cpp",
50  ]
51
52  defines = [ "AMS_LOG_TAG = \"AppMgrService\"" ]
53
54  if (ability_command_for_test) {
55    defines += [ "ABILITY_COMMAND_FOR_TEST" ]
56  }
57
58  configs = [ ":appmgr_config" ]
59  cflags = []
60  if (target_cpu == "arm") {
61    cflags += [ "-DBINDER_IPC_32BIT" ]
62  }
63  deps = [
64    "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr",
65    "${ability_runtime_services_path}/common:event_report",
66    "${ability_runtime_services_path}/common:perm_verification",
67  ]
68
69  external_deps = [
70    "ability_base:base",
71    "ability_base:configuration",
72    "ability_base:want",
73    "ability_runtime:ability_deps_wrapper",
74    "ability_runtime:app_manager",
75    "access_token:libaccesstoken_sdk",
76    "appspawn:appspawn_socket_client",
77    "bundle_framework:appexecfwk_base",
78    "bundle_framework:appexecfwk_core",
79    "common_event_service:cesfwk_innerkits",
80    "eventhandler:libeventhandler",
81    "hicollie_native:libhicollie",
82    "hisysevent_native:libhisysevent",
83    "hitrace_native:hitrace_meter",
84    "hiviewdfx_hilog_native:libhilog",
85    "init:libbeget_proxy",
86    "init:libbegetutil",
87    "ipc:ipc_core",
88    "safwk:system_ability_fwk",
89    "samgr:samgr_proxy",
90  ]
91
92  if (ability_runtime_graphics) {
93    defines += [ "SUPPORT_GRAPHICS" ]
94    deps += []
95    external_deps += [
96      "i18n:intl_util",
97      "window_manager:libwm",
98    ]
99  }
100
101  if (background_task_mgr_continuous_task_enable) {
102    defines += [ "BGTASKMGR_CONTINUOUS_TASK_ENABLE" ]
103  }
104
105  if (is_asan) {
106    defines += [ "SUPPORT_ASAN" ]
107  }
108
109  version_script = "libappms.map"
110  subsystem_name = "ability"
111  part_name = "ability_runtime"
112}
113