1# Copyright (c) 2024 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("//build/test.gni") 16import("../../ressched/ressched.gni") 17import("../ressched_executor.gni") 18 19config("service_public_config") { 20 include_dirs = [ 21 "${ressched_common}/include", 22 "${resschedexe_common}/include", 23 "${resschedexe_plugins}/pluginbase/include", 24 "${resschedexe_plugins}/resschedfwk/include", 25 "resschedexemgr/include", 26 ] 27} 28 29config("service_private_config") { 30 include_dirs = [ "resschedexeservice/include" ] 31} 32 33ohos_shared_library("resschedexesvc") { 34 configs = [ ":service_private_config" ] 35 36 public_configs = [ ":service_public_config" ] 37 38 defines = [] 39 40 include_dirs = [] 41 42 sources = [ 43 "${resschedexe_plugins}/resschedfwk/src/config_reader.cpp", 44 "${resschedexe_plugins}/resschedfwk/src/plugin_mgr.cpp", 45 "${resschedexe_plugins}/resschedfwk/src/plugin_switch.cpp", 46 "resschedexemgr/src/res_sched_exe_mgr.cpp", 47 "resschedexeservice/src/res_sched_exe_service.cpp", 48 "resschedexeservice/src/res_sched_exe_service_ability.cpp", 49 "resschedexeservice/src/res_sched_exe_service_stub.cpp", 50 ] 51 52 deps = [ "${resschedexe_interfaces}/innerkits/ressched_executor_client:resschedexe_client" ] 53 54 external_deps = [ 55 "access_token:libaccesstoken_sdk", 56 "access_token:libtokenid_sdk", 57 "c_utils:utils", 58 "config_policy:configpolicy_util", 59 "eventhandler:libeventhandler", 60 "ffrt:libffrt", 61 "hilog:libhilog", 62 "hisysevent:libhisysevent", 63 "hisysevent:libhisyseventmanager", 64 "hitrace:hitrace_meter", 65 "init:libbegetutil", 66 "ipc:ipc_single", 67 "libxml2:libxml2", 68 "safwk:system_ability_fwk", 69 "samgr:samgr_proxy", 70 ] 71 72 if (resource_schedule_service_with_ffrt_enable) { 73 defines += [ "RESOURCE_SCHEDULE_SERVICE_WITH_FFRT_ENABLE" ] 74 } 75 76 version_script = "libresschedexeservice.versionscript" 77 shlib_type = "sa" 78 subsystem_name = "resourceschedule" 79 part_name = "resource_schedule_service" 80 81 branch_protector_ret = "pac_ret" 82 83 sanitize = { 84 cfi = true 85 cfi_cross_dso = true 86 debug = false 87 } 88} 89 90# for unittest 91ohos_static_library("resschedexesvc_static") { 92 configs = [] 93 94 public_configs = [ 95 ":service_private_config", 96 ":service_public_config", 97 ] 98 99 defines = [] 100 101 include_dirs = [] 102 103 sources = [ 104 "${resschedexe_plugins}/resschedfwk/src/config_reader.cpp", 105 "${resschedexe_plugins}/resschedfwk/src/plugin_mgr.cpp", 106 "${resschedexe_plugins}/resschedfwk/src/plugin_switch.cpp", 107 "resschedexemgr/src/res_sched_exe_mgr.cpp", 108 "resschedexeservice/src/res_sched_exe_service.cpp", 109 "resschedexeservice/src/res_sched_exe_service_ability.cpp", 110 "resschedexeservice/src/res_sched_exe_service_stub.cpp", 111 ] 112 113 deps = [ "${resschedexe_interfaces}/innerkits/ressched_executor_client:resschedexe_client" ] 114 115 external_deps = [ 116 "access_token:libaccesstoken_sdk", 117 "access_token:libtokenid_sdk", 118 "c_utils:utils", 119 "config_policy:configpolicy_util", 120 "eventhandler:libeventhandler", 121 "ffrt:libffrt", 122 "hilog:libhilog", 123 "hisysevent:libhisysevent", 124 "hisysevent:libhisyseventmanager", 125 "hitrace:hitrace_meter", 126 "init:libbegetutil", 127 "ipc:ipc_single", 128 "libxml2:libxml2", 129 "safwk:system_ability_fwk", 130 "samgr:samgr_proxy", 131 ] 132 133 if (resource_schedule_service_with_ffrt_enable) { 134 defines += [ "RESOURCE_SCHEDULE_SERVICE_WITH_FFRT_ENABLE" ] 135 } 136 137 subsystem_name = "resourceschedule" 138 part_name = "resource_schedule_service" 139 140 branch_protector_ret = "pac_ret" 141 142 sanitize = { 143 cfi = true 144 cfi_cross_dso = true 145 debug = false 146 } 147} 148