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("//build/ohos/ace/ace.gni") 16import("//foundation/resourceschedule/work_scheduler/workscheduler.gni") 17 18config("worksched_public_config") { 19 include_dirs = [ "${worksched_root_path}/interfaces/kits/js/napi/include" ] 20} 21 22ohos_shared_library("workscheduler") { 23 branch_protector_ret = "pac_ret" 24 25 sanitize = { 26 cfi = true 27 cfi_cross_dso = true 28 debug = false 29 } 30 cflags_cc = [ 31 "-fdata-sections", 32 "-ffunction-sections", 33 "-fvisibility=hidden", 34 "-fstack-protector-strong", 35 "-Os", 36 ] 37 public_configs = [ ":worksched_public_config" ] 38 39 sources = [ 40 "${worksched_root_path}/interfaces/kits/js/napi/src/common.cpp", 41 "${worksched_root_path}/interfaces/kits/js/napi/src/common_want.cpp", 42 "${worksched_root_path}/interfaces/kits/js/napi/src/get_work_status.cpp", 43 "${worksched_root_path}/interfaces/kits/js/napi/src/init.cpp", 44 "${worksched_root_path}/interfaces/kits/js/napi/src/is_last_work_time_out.cpp", 45 "${worksched_root_path}/interfaces/kits/js/napi/src/obtain_all_works.cpp", 46 "${worksched_root_path}/interfaces/kits/js/napi/src/start_work.cpp", 47 "${worksched_root_path}/interfaces/kits/js/napi/src/stop_and_clear_works.cpp", 48 "${worksched_root_path}/interfaces/kits/js/napi/src/stop_work.cpp", 49 ] 50 51 deps = [ 52 "${worksched_frameworks_path}:workschedclient", 53 "${worksched_utils_path}:workschedutils", 54 ] 55 56 external_deps = [ 57 "ability_base:base", 58 "ability_base:want", 59 "c_utils:utils", 60 "hilog:libhilog", 61 "ipc:ipc_core", 62 "napi:ace_napi", 63 ] 64 65 relative_install_dir = "module/resourceschedule" 66 part_name = "${worksched_native_part_name}" 67 subsystem_name = "resourceschedule" 68} 69