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("ability_manager_public_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "include/", 21 "//base/notification/eventhandler/interfaces/inner_api", 22 "${ability_base_kits_path}/configuration/include", 23 "${ability_base_kits_path}/uri/include", 24 "${ability_base_kits_path}/want/include", 25 "${ability_runtime_path}/interfaces/kits/native/ability/native", 26 "${bundlefwk_inner_api_path}/appexecfwk_base/include", 27 "${bundlefwk_inner_api_path}/appexecfwk_core/include/bundlemgr", 28 "${ability_runtime_innerkits_path}/app_manager/include/appmgr", 29 "${ability_runtime_path}/interfaces/kits/native/appkit/app", 30 "${ability_runtime_innerkits_path}/dataobs_manager/include", 31 "//third_party/jsoncpp/include", 32 ] 33 34 defines = [] 35 36 if (ability_command_for_test) { 37 defines += [ "ABILITY_COMMAND_FOR_TEST" ] 38 } 39 40 if (ability_runtime_graphics) { 41 include_dirs += [ "${multimedia_path}/interfaces/innerkits/include" ] 42 43 defines += [ "SUPPORT_GRAPHICS" ] 44 } 45 46 cflags = [] 47 if (target_cpu == "arm") { 48 cflags += [ "-DBINDER_IPC_32BIT" ] 49 } 50} 51 52ohos_shared_library("ability_manager") { 53 sources = [ 54 "${ability_runtime_native_path}/ability/native/data_ability_operation.cpp", 55 "${ability_runtime_native_path}/ability/native/data_ability_operation_builder.cpp", 56 "${ability_runtime_native_path}/ability/native/data_ability_result.cpp", 57 "${ability_runtime_native_path}/ability/native/task_handler.cpp", 58 "${ability_runtime_native_path}/ability/native/task_handler_client.cpp", 59 "${ability_runtime_services_path}/abilitymgr/src/ability_connect_callback_stub.cpp", 60 "${ability_runtime_services_path}/abilitymgr/src/ability_manager_client.cpp", 61 "${ability_runtime_services_path}/abilitymgr/src/ability_manager_proxy.cpp", 62 "${ability_runtime_services_path}/abilitymgr/src/ability_manager_stub.cpp", 63 "${ability_runtime_services_path}/abilitymgr/src/ability_running_info.cpp", 64 "${ability_runtime_services_path}/abilitymgr/src/ability_scheduler_proxy.cpp", 65 "${ability_runtime_services_path}/abilitymgr/src/ability_scheduler_stub.cpp", 66 "${ability_runtime_services_path}/abilitymgr/src/ability_start_setting.cpp", 67 "${ability_runtime_services_path}/abilitymgr/src/caller_info.cpp", 68 "${ability_runtime_services_path}/abilitymgr/src/extension_running_info.cpp", 69 "${ability_runtime_services_path}/abilitymgr/src/image_info.cpp", 70 "${ability_runtime_services_path}/abilitymgr/src/launch_param.cpp", 71 "${ability_runtime_services_path}/abilitymgr/src/lifecycle_state_info.cpp", 72 "${ability_runtime_services_path}/abilitymgr/src/mission_info.cpp", 73 "${ability_runtime_services_path}/abilitymgr/src/mission_listener_proxy.cpp", 74 "${ability_runtime_services_path}/abilitymgr/src/mission_listener_stub.cpp", 75 "${ability_runtime_services_path}/abilitymgr/src/mission_snapshot.cpp", 76 "${ability_runtime_services_path}/abilitymgr/src/remote_mission_listener_proxy.cpp", 77 "${ability_runtime_services_path}/abilitymgr/src/remote_mission_listener_stub.cpp", 78 "${ability_runtime_services_path}/abilitymgr/src/sender_info.cpp", 79 "${ability_runtime_services_path}/abilitymgr/src/start_options.cpp", 80 "${ability_runtime_services_path}/abilitymgr/src/stop_user_callback_proxy.cpp", 81 "${ability_runtime_services_path}/abilitymgr/src/stop_user_callback_stub.cpp", 82 "${ability_runtime_services_path}/abilitymgr/src/system_ability_token_callback_stub.cpp", 83 "${ability_runtime_services_path}/abilitymgr/src/want_receiver_stub.cpp", 84 "${ability_runtime_services_path}/abilitymgr/src/want_sender_info.cpp", 85 "${ability_runtime_services_path}/abilitymgr/src/want_sender_proxy.cpp", 86 "${ability_runtime_services_path}/abilitymgr/src/want_sender_stub.cpp", 87 "${ability_runtime_services_path}/abilitymgr/src/wants_info.cpp", 88 "src/window_manager_service_handler_proxy.cpp", 89 "src/window_manager_service_handler_stub.cpp", 90 ] 91 92 public_configs = [ 93 ":ability_manager_public_config", 94 "${ability_runtime_services_path}/abilitymgr:abilityms_config", 95 ] 96 97 deps = [ "//third_party/jsoncpp:jsoncpp" ] 98 99 external_deps = [ 100 "ability_base:want", 101 "ability_base:zuri", 102 "ability_runtime:app_manager", 103 "c_utils:utils", 104 "eventhandler:libeventhandler", 105 "hitrace_native:hitrace_meter", 106 "hiviewdfx_hilog_native:libhilog", 107 "ipc:ipc_core", 108 "relational_store:native_dataability", 109 "relational_store:native_rdb", 110 "samgr:samgr_proxy", 111 ] 112 113 if (ability_runtime_graphics) { 114 deps += [] 115 external_deps += [ "multimedia_image_framework:image_native" ] 116 } 117 118 cflags_cc = [] 119 if (os_dlp_part_enabled) { 120 cflags_cc += [ "-DWITH_DLP" ] 121 external_deps += [ "dlp_permission_service:libdlpparse" ] 122 } 123 124 subsystem_name = "ability" 125 part_name = "ability_runtime" 126} 127