1# Copyright (c) 2023-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")
15
16declare_args() {
17  device_status_intention_framework = true
18  device_status_rust_enabled = false
19  device_status_interaction_coordination = false
20  device_status_drag_enable_monitor = true
21  device_status_drag_enable_interceptor = false
22  device_status_drag_enable_animation = false
23  device_status_performance_check = true
24  device_status_hisysevent_enable = false
25  device_status_hitrace_enable = false
26  device_status_udmf_enabled = false
27  device_status_sensor_enable = true
28  device_status_memmgr_enable = false
29
30  # origin variables sets
31  if (!is_arkui_x) {
32    device_status_intention_framework = true
33    device_status_drag_enable_monitor = true
34    device_status_sensor_enable = true
35    device_status_memmgr_enable = false
36
37    if (defined(global_parts_info)) {
38      if (!defined(global_parts_info.sensors_sensor)) {
39        device_status_sensor_enable = false
40      }
41      if (defined(global_parts_info.resourceschedule_memmgr_override)) {
42        device_status_memmgr_enable = true
43      }
44    }
45  } else {  # is_arkui_x
46    device_status_intention_framework = false
47    device_status_drag_enable_monitor = false
48    device_status_sensor_enable = false
49    device_status_memmgr_enable = false
50  }
51}
52
53if (defined(global_parts_info)) {
54  if (defined(global_parts_info.hiviewdfx_hisysevent)) {
55    device_status_hisysevent_enable = true
56  }
57  if (defined(global_parts_info.hiviewdfx_hitrace)) {
58    device_status_hitrace_enable = true
59  }
60  if (defined(global_parts_info.distributeddatamgr_udmf)) {
61    device_status_udmf_enabled = true
62  }
63}
64
65ability_runtime_path = "//foundation/ability/ability_runtime"
66ability_runtime_kits_path = "${ability_runtime_path}/frameworks/kits"
67device_status_part_name = "device_status"
68device_status_subsystem_name = "msdp"
69device_status_root_path = "//base/msdp/device_status"
70device_status_interfaces_path = "${device_status_root_path}/interfaces"
71device_status_libs_path = "${device_status_root_path}/libs"
72device_status_frameworks_path = "${device_status_root_path}/frameworks"
73device_status_service_path = "${device_status_root_path}/services"
74device_status_utils_path = "${device_status_root_path}/utils/common"
75device_status_intention_path = "${device_status_root_path}/intention"
76device_status_fuzz_output_path = "${device_status_part_name}/device_status"
77intention_root_path = "//base/msdp/device_status/intention"
78file_dfs_service_path = "//foundation/filemanagement/dfs_service"
79file_framework_root_path = "//foundation/appframework"
80file_arkui_root_path = "//foundation/arkui"
81library_utils_path = "//commonlibrary/c_utils"
82plugins_media_path = "//plugins/multimedia"
83file_dfx_hilog_path = "//base/hiviewdfx/hilog"
84foundation_media_path = "//foundation/multimedia"
85foundation_input_path = "//foundation/multimodalinput"
86foundation_graphic_path = "//foundation/graphic"
87
88device_status_default_defines = []
89
90if (device_status_intention_framework) {
91  device_status_default_defines += [ "OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK" ]
92}
93
94if (device_status_rust_enabled) {
95  device_status_default_defines += [ "OHOS_BUILD_ENABLE_RUST_IMPL" ]
96}
97
98if (device_status_interaction_coordination) {
99  device_status_default_defines += [ "OHOS_BUILD_ENABLE_COORDINATION" ]
100}
101
102if (device_status_performance_check) {
103  device_status_default_defines += [ "ENABLE_PERFORMANCE_CHECK" ]
104}
105
106if (device_status_drag_enable_monitor) {
107  device_status_default_defines += [ "OHOS_DRAG_ENABLE_MONITOR" ]
108}
109
110if (device_status_drag_enable_interceptor) {
111  device_status_default_defines += [ "OHOS_DRAG_ENABLE_INTERCEPTOR" ]
112}
113
114if (device_status_drag_enable_animation) {
115  device_status_default_defines += [ "OHOS_DRAG_ENABLE_ANIMATION" ]
116}
117
118# add new macro
119if (is_arkui_x) {
120  device_status_default_defines += [ "OHOS_BUILD_ENABLE_ARKUI_X" ]
121}
122