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 device_status_enable_universal_drag = false 30 device_status_enable_internal_drop_animation = false 31 device_status_device_type = "default" 32 device_status_motion_enable = false 33 device_status_pullthrow_enable = false 34 device_status_boomerang_onestep = false 35 device_status_boomerang_support_hdr = false 36 37 # origin variables sets 38 if (!is_arkui_x) { 39 device_status_intention_framework = true 40 device_status_drag_enable_monitor = true 41 device_status_sensor_enable = true 42 device_status_memmgr_enable = false 43 44 if (defined(global_parts_info)) { 45 if (!defined(global_parts_info.sensors_sensor)) { 46 device_status_sensor_enable = false 47 } 48 if (defined(global_parts_info.resourceschedule_memmgr_override)) { 49 device_status_memmgr_enable = true 50 } 51 if (defined(global_parts_info.msdp_motion)) { 52 device_status_motion_enable = true 53 } 54 } 55 } else { # is_arkui_x 56 device_status_intention_framework = false 57 device_status_drag_enable_monitor = false 58 device_status_sensor_enable = false 59 device_status_memmgr_enable = false 60 } 61} 62 63if (defined(global_parts_info)) { 64 if (defined(global_parts_info.hiviewdfx_hisysevent)) { 65 device_status_hisysevent_enable = true 66 } 67 if (defined(global_parts_info.hiviewdfx_hitrace)) { 68 device_status_hitrace_enable = true 69 } 70 if (defined(global_parts_info.distributeddatamgr_udmf)) { 71 device_status_udmf_enabled = true 72 } 73} 74 75ability_runtime_path = "//foundation/ability/ability_runtime" 76ability_runtime_kits_path = "${ability_runtime_path}/frameworks/kits" 77device_status_part_name = "device_status" 78device_status_subsystem_name = "msdp" 79device_status_root_path = "//base/msdp/device_status" 80device_status_interfaces_path = "${device_status_root_path}/interfaces" 81device_status_libs_path = "${device_status_root_path}/libs" 82device_status_frameworks_path = "${device_status_root_path}/frameworks" 83device_status_intention_path = "${device_status_root_path}/intention" 84device_status_service_path = "${device_status_root_path}/services" 85device_status_utils_path = "${device_status_root_path}/utils/common" 86device_status_fuzz_output_path = "${device_status_part_name}/device_status" 87intention_root_path = "//base/msdp/device_status/intention" 88file_dfs_service_path = "//foundation/filemanagement/dfs_service" 89file_framework_root_path = "//foundation/appframework" 90file_arkui_root_path = "//foundation/arkui" 91library_utils_path = "//commonlibrary/c_utils" 92plugins_media_path = "//plugins/multimedia" 93file_dfx_hilog_path = "//base/hiviewdfx/hilog" 94foundation_media_path = "//foundation/multimedia" 95foundation_input_path = "//foundation/multimodalinput" 96foundation_graphic_path = "//foundation/graphic" 97 98device_status_default_defines = [] 99 100if (device_status_intention_framework) { 101 device_status_default_defines += [ "OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK" ] 102} 103 104if (device_status_rust_enabled) { 105 device_status_default_defines += [ "OHOS_BUILD_ENABLE_RUST_IMPL" ] 106} 107 108if (device_status_interaction_coordination) { 109 device_status_default_defines += [ "OHOS_BUILD_ENABLE_COORDINATION" ] 110} 111 112if (device_status_performance_check) { 113 device_status_default_defines += [ "ENABLE_PERFORMANCE_CHECK" ] 114} 115 116if (device_status_drag_enable_monitor) { 117 device_status_default_defines += [ "OHOS_DRAG_ENABLE_MONITOR" ] 118} 119 120if (device_status_drag_enable_interceptor) { 121 device_status_default_defines += [ "OHOS_DRAG_ENABLE_INTERCEPTOR" ] 122} 123 124if (device_status_drag_enable_animation) { 125 device_status_default_defines += [ "OHOS_DRAG_ENABLE_ANIMATION" ] 126} 127 128# add new macro 129if (is_arkui_x) { 130 device_status_default_defines += [ "OHOS_BUILD_ENABLE_ARKUI_X" ] 131} 132 133if (device_status_enable_universal_drag) { 134 device_status_default_defines += [ "OHOS_BUILD_UNIVERSAL_DRAG" ] 135} 136 137if (device_status_enable_internal_drop_animation) { 138 device_status_default_defines += [ "OHOS_BUILD_INTERNAL_DROP_ANIMATION" ] 139} 140 141if (device_status_device_type == "pc") { 142 device_status_default_defines += [ "OHOS_BUILD_PC_PRODUCT" ] 143} 144 145if (device_status_pullthrow_enable) { 146 device_status_default_defines += [ "OHOS_ENABLE_PULLTHROW" ] 147} 148 149if (device_status_boomerang_onestep) { 150 device_status_default_defines += [ "BOOMERANG_ONESTEP" ] 151} 152 153if (device_status_boomerang_support_hdr) { 154 device_status_default_defines += [ "BOOMERANG_SUPPORT_HDR" ] 155}