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" || 27 current_os == "android" || current_os == "ios" 28rosen_preview = rosen_is_mac || rosen_is_win || rosen_is_linux 29 30if (rosen_cross_platform) { 31 rs_common_define += [ 32 "ROSEN_CROSS_PLATFORM", 33 "ROSEN_TRACE_DISABLE", 34 ] 35} 36 37if (rosen_preview) { 38 rs_common_define += [ 39 "ROSEN_PREVIEW", 40 "ROSEN_DISABLE_DEBUGLOG", 41 ] 42} 43 44if (rosen_is_ohos) { 45 rs_common_define += [ "ROSEN_OHOS" ] 46} 47 48if (rosen_is_android) { 49 rs_common_define += [ "ROSEN_ANDROID" ] 50} 51 52if (rosen_is_ios) { 53 rs_common_define += [ "ROSEN_IOS" ] 54} 55 56if (rosen_is_mac) { 57 rs_common_define += [ "ROSEN_MAC" ] 58} 59 60if (rosen_is_win) { 61 rs_common_define += [ "ROSEN_WIN" ] 62} 63 64if (rosen_is_linux) { 65 rs_common_define += [ "ROSEN_LINUX" ] 66} 67 68enable_export_macro = true 69enable_ipc_security = false 70 71accessibility_root = "//foundation/barrierfree/accessibility" 72access_token_root = "//base/security/access_token" 73appframework_root = "//foundation/appframework" 74ipc_root = "//foundation/communication/ipc" 75resourceschedule_root = "//foundation/resourceschedule/frame_aware_sched" 76rosen_root = "//foundation/graphic/graphic_2d/rosen" 77