1# Copyright (c) 2021-2023 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 16rosen_is_ohos = current_os == "ohos" 17rosen_is_android = current_os == "android" 18rosen_is_ios = current_os == "ios" || current_os == "tvos" 19rosen_is_mac = current_os == "mac" 20rosen_is_win = current_os == "win" || current_os == "mingw" 21rosen_is_linux = current_os == "linux" 22 23rs_common_define = [] 24 25rosen_cross_platform = 26 current_os == "mac" || current_os == "mingw" || current_os == "linux" 27if (rosen_cross_platform) { 28 rs_common_define += [ 29 "ROSEN_CROSS_PLATFORM", 30 "ROSEN_TRACE_DISABLE", 31 "ROSEN_DISABLE_DEBUGLOG" 32 ] 33} 34 35if (rosen_is_ohos) { 36 rs_common_define += [ "ROSEN_OHOS" ] 37} 38 39if (rosen_is_android) { 40 rs_common_define += [ "ROSEN_ANDROID" ] 41} 42 43if (rosen_is_ios) { 44 rs_common_define += [ "ROSEN_IOS" ] 45} 46 47if (rosen_is_mac) { 48 rs_common_define += [ "ROSEN_MAC" ] 49} 50 51if (rosen_is_win) { 52 rs_common_define += [ "ROSEN_WIN" ] 53} 54 55if (rosen_is_linux) { 56 rs_common_define += [ "ROSEN_LINUX" ] 57} 58enable_export_macro = true 59 60rosen_root = "//foundation/graphic/graphic_2d/rosen" 61 62accessibility_root = "//foundation/barrierfree/accessibility" 63resourceschedule_root = "//foundation/resourceschedule/frame_aware_sched" 64