1686862fbSopenharmony_ci# Copyright (c) 2023 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("tests_public_config") {
18686862fbSopenharmony_ci  visibility = [ ":*" ]
19686862fbSopenharmony_ci  include_dirs = [
20686862fbSopenharmony_ci    "${dms_path}/common/include",
21686862fbSopenharmony_ci    "${dms_path}/interfaces/innerkits/distributed_event/include",
22686862fbSopenharmony_ci    "${dms_path}/interfaces/innerkits/tests/",
23686862fbSopenharmony_ci    "${dms_path}/services/dtbabilitymgr/include/",
24686862fbSopenharmony_ci  ]
25686862fbSopenharmony_ci
26686862fbSopenharmony_ci  cflags = []
27686862fbSopenharmony_ci  if (target_cpu == "arm") {
28686862fbSopenharmony_ci    cflags += [ "-DBINDER_IPC_32BIT" ]
29686862fbSopenharmony_ci  }
30686862fbSopenharmony_ci}
31686862fbSopenharmony_ci
32686862fbSopenharmony_ciohos_executable("dms_sdk_demo") {
33686862fbSopenharmony_ci  branch_protector_ret = "pac_ret"
34686862fbSopenharmony_ci  sanitize = {
35686862fbSopenharmony_ci    cfi = true
36686862fbSopenharmony_ci    cfi_cross_dso = true
37686862fbSopenharmony_ci    debug = false
38686862fbSopenharmony_ci  }
39686862fbSopenharmony_ci
40686862fbSopenharmony_ci  deps =
41686862fbSopenharmony_ci      [ "${dms_path}/interfaces/innerkits/distributed_event:distributed_sdk" ]
42686862fbSopenharmony_ci
43686862fbSopenharmony_ci  defines = [
44686862fbSopenharmony_ci    "HI_LOG_ENABLE",
45686862fbSopenharmony_ci    "LOG_TAG=\"dms_sdk_demo\"",
46686862fbSopenharmony_ci    "LOG_DOMAIN=0xD004170",
47686862fbSopenharmony_ci    "DH_LOG_TAG=\"dms_sdk_demo\"",
48686862fbSopenharmony_ci    "VERSION_STR=\"1.0.0.302\"",
49686862fbSopenharmony_ci    "DMS_SOURCE",
50686862fbSopenharmony_ci  ]
51686862fbSopenharmony_ci
52686862fbSopenharmony_ci  sources = [
53686862fbSopenharmony_ci    "${dms_path}/interfaces/innerkits/distributed_event/src/dms_listener_stub.cpp",
54686862fbSopenharmony_ci    "${dms_path}/interfaces/innerkits/tests/dms_sdk_demo.cpp",
55686862fbSopenharmony_ci  ]
56686862fbSopenharmony_ci
57686862fbSopenharmony_ci  public_configs = [
58686862fbSopenharmony_ci    ":tests_public_config",
59686862fbSopenharmony_ci    "${dms_path}/services/dtbschedmgr/test/resource:coverage_flags",
60686862fbSopenharmony_ci  ]
61686862fbSopenharmony_ci
62686862fbSopenharmony_ci  external_deps = [
63686862fbSopenharmony_ci    "c_utils:utils",
64686862fbSopenharmony_ci    "hilog:libhilog",
65686862fbSopenharmony_ci    "ipc:ipc_core",
66686862fbSopenharmony_ci    "samgr:samgr_proxy",
67686862fbSopenharmony_ci  ]
68686862fbSopenharmony_ci
69686862fbSopenharmony_ci  subsystem_name = "ability"
70686862fbSopenharmony_ci  part_name = "dmsfwk"
71686862fbSopenharmony_ci}
72