# Copyright (c) 2021-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") rosen_is_ohos = current_os == "ohos" rosen_is_android = current_os == "android" rosen_is_ios = current_os == "ios" || current_os == "tvos" rosen_is_mac = current_os == "mac" rosen_is_win = current_os == "win" || current_os == "mingw" rosen_is_linux = current_os == "linux" rs_common_define = [] rosen_cross_platform = current_os == "mac" || current_os == "mingw" || current_os == "linux" || current_os == "android" || current_os == "ios" rosen_preview = rosen_is_mac || rosen_is_win || rosen_is_linux if (rosen_cross_platform) { rs_common_define += [ "ROSEN_CROSS_PLATFORM", "ROSEN_DISABLE_DEBUGLOG", "ROSEN_TRACE_DISABLE", ] if (runtime_mode == "release") { rs_common_define += [ "RUNTIME_MODE_RELEASE" ] } } if (use_rosen_drawing && defined(is_arkui_x) && is_arkui_x) { rs_common_define += [ "USE_ROSEN_DRAWING" ] } if (is_emulator) { rs_common_define += [ "ROSEN_EMULATOR" ] } if (rosen_preview) { rs_common_define += [ "ROSEN_PREVIEW" ] } if (rosen_is_ohos) { rs_common_define += [ "ROSEN_OHOS" ] } if (rosen_is_android) { rs_common_define += [ "ROSEN_ANDROID" ] rs_common_define += [ "USE_SURFACE_TEXTURE" ] rs_common_define += [ "ROSEN_ARKUI_X" ] } if (rosen_is_ios) { rs_common_define += [ "ROSEN_IOS" ] rs_common_define += [ "USE_SURFACE_TEXTURE" ] rs_common_define += [ "ROSEN_ARKUI_X" ] } if (rosen_is_mac) { rs_common_define += [ "ROSEN_MAC" ] } if (rosen_is_win) { rs_common_define += [ "ROSEN_WIN" ] } if (rosen_is_linux) { rs_common_define += [ "ROSEN_LINUX" ] } enable_export_macro = true enable_ipc_security = true enable_ipc_security_access_counter = false accessibility_root = "//foundation/barrierfree/accessibility" appframework_root = "//foundation/appframework" resourceschedule_root = "//foundation/resourceschedule/frame_aware_sched" rosen_root = "//foundation/graphic/graphic_2d/rosen"