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  public_configs = [ ":worksched_public_config" ]
31
32  sources = [
33    "${worksched_root_path}/interfaces/kits/js/napi/src/common.cpp",
34    "${worksched_root_path}/interfaces/kits/js/napi/src/common_want.cpp",
35    "${worksched_root_path}/interfaces/kits/js/napi/src/get_work_status.cpp",
36    "${worksched_root_path}/interfaces/kits/js/napi/src/init.cpp",
37    "${worksched_root_path}/interfaces/kits/js/napi/src/is_last_work_time_out.cpp",
38    "${worksched_root_path}/interfaces/kits/js/napi/src/obtain_all_works.cpp",
39    "${worksched_root_path}/interfaces/kits/js/napi/src/start_work.cpp",
40    "${worksched_root_path}/interfaces/kits/js/napi/src/stop_and_clear_works.cpp",
41    "${worksched_root_path}/interfaces/kits/js/napi/src/stop_work.cpp",
42  ]
43
44  deps = [
45    "${worksched_frameworks_path}:workschedclient",
46    "${worksched_utils_path}:workschedutils",
47  ]
48
49  external_deps = [
50    "ability_base:base",
51    "ability_base:want",
52    "hilog:libhilog",
53    "napi:ace_napi",
54  ]
55
56  relative_install_dir = "module/resourceschedule"
57  part_name = "${worksched_native_part_name}"
58  subsystem_name = "resourceschedule"
59}
60