1686862fbSopenharmony_ci# Copyright (c) 2023-2024 Huawei Device Co., Ltd.
2686862fbSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3686862fbSopenharmony_ci# you may not use this file except in compliance with the License.
4686862fbSopenharmony_ci# You may obtain a copy of the License at
5686862fbSopenharmony_ci#
6686862fbSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7686862fbSopenharmony_ci#
8686862fbSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9686862fbSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10686862fbSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11686862fbSopenharmony_ci# See the License for the specific language governing permissions and
12686862fbSopenharmony_ci# limitations under the License.
13686862fbSopenharmony_ci
14686862fbSopenharmony_ciimport("//build/ohos.gni")
15686862fbSopenharmony_ciimport("../../../dmsfwk.gni")
16686862fbSopenharmony_ci
17686862fbSopenharmony_ciconfig("dms_sdk_public_config") {
18686862fbSopenharmony_ci  visibility = [ ":*" ]
19686862fbSopenharmony_ci  include_dirs = [
20686862fbSopenharmony_ci    "${dms_path}/common/include",
21686862fbSopenharmony_ci    "${dms_path}/interfaces/innerkits/common/include/",
22686862fbSopenharmony_ci    "${dms_path}/interfaces/innerkits/distributed_event/include/",
23686862fbSopenharmony_ci    "${dms_path}/services/dtbabilitymgr/include/",
24686862fbSopenharmony_ci    "${dms_path}/services/dtbschedmgr/include/",
25686862fbSopenharmony_ci  ]
26686862fbSopenharmony_ci
27686862fbSopenharmony_ci  cflags = []
28686862fbSopenharmony_ci  if (target_cpu == "arm") {
29686862fbSopenharmony_ci    cflags += [ "-DBINDER_IPC_32BIT" ]
30686862fbSopenharmony_ci  }
31686862fbSopenharmony_ci}
32686862fbSopenharmony_ci
33686862fbSopenharmony_ciohos_shared_library("distributed_sdk") {
34686862fbSopenharmony_ci  branch_protector_ret = "pac_ret"
35686862fbSopenharmony_ci  sanitize = {
36686862fbSopenharmony_ci    cfi = true
37686862fbSopenharmony_ci    cfi_cross_dso = true
38686862fbSopenharmony_ci    debug = false
39686862fbSopenharmony_ci  }
40686862fbSopenharmony_ci
41686862fbSopenharmony_ci  sources = [
42686862fbSopenharmony_ci    "${dms_path}/interfaces/innerkits/distributed_event/src/dms_client.cpp",
43686862fbSopenharmony_ci    "${dms_path}/interfaces/innerkits/distributed_event/src/dms_handler.cpp",
44686862fbSopenharmony_ci    "${dms_path}/interfaces/innerkits/distributed_event/src/dms_listener_stub.cpp",
45686862fbSopenharmony_ci    "${dms_path}/interfaces/innerkits/distributed_event/src/dms_sa_client.cpp",
46686862fbSopenharmony_ci    "${dms_path}/interfaces/innerkits/distributed_event/src/dms_static_capability.cpp",
47686862fbSopenharmony_ci  ]
48686862fbSopenharmony_ci
49686862fbSopenharmony_ci  public_configs = [
50686862fbSopenharmony_ci    ":dms_sdk_public_config",
51686862fbSopenharmony_ci    "${dms_path}/services/dtbschedmgr/test/resource:coverage_flags",
52686862fbSopenharmony_ci  ]
53686862fbSopenharmony_ci
54686862fbSopenharmony_ci  external_deps = [
55686862fbSopenharmony_ci    "c_utils:utils",
56686862fbSopenharmony_ci    "device_info_manager:distributed_device_profile_common",
57686862fbSopenharmony_ci    "hilog:libhilog",
58686862fbSopenharmony_ci    "ipc:ipc_core",
59686862fbSopenharmony_ci    "samgr:samgr_proxy",
60686862fbSopenharmony_ci  ]
61686862fbSopenharmony_ci  public_external_deps = [ "ability_runtime:ability_manager" ]
62686862fbSopenharmony_ci  subsystem_name = "ability"
63686862fbSopenharmony_ci  innerapi_tags = [ "platformsdk" ]
64686862fbSopenharmony_ci  part_name = "dmsfwk"
65686862fbSopenharmony_ci}
66