# Copyright (c) 2021 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/config/clang/clang.gni") import("//build/ohos_var.gni") use_flutter_icu = true # Now only on wearable ohos platforms enable this feature use_system_skia = true only_wearable_enable = false # Now only on wearable ohos platforms enable this feature use_system_skia = !is_standard_system # Enable dump skia draw commands by this config # Better to change "use_system_skia" to false, otherwise may missing some commands enable_dump_drawcmd = false use_flutter_icu = true aosp_libs_dir = "//prebuilts/aosp_prebuilt_libs/asdk_libs" libs_root = "${aosp_libs_dir}/sdk" ace_root = "//foundation/ace/ace_engine" ace_flutter_engine_root = "$ace_root/flutter_engine" flutter_root = "//third_party/flutter" ace_wearable_defines = [ "WEARABLE_PRODUCT" ] # In the performance scenario, turn off the ACE_DEBUG macro. ace_common_defines = [ "ACE_LOG_TAG=\"Ace\"" ] ace_ohos_defines = [ "OHOS_PLATFORM" ] # ===== For ACE PC preview. ===== declare_args() { # Disable glfw window to build for PC preview scenario. enable_glfw_window = false } # Only use this to set/unset some cflags, use "platform" variable in gn template to add # source code for Windows. use_mingw_win = "${current_os}_${current_cpu}" == "mingw_x86_64" # source code for mac. use_mac = "${current_os}_${current_cpu}" == "mac_x64" # Toolchain windows_buildtool = "//build/toolchain/mingw:mingw_x86_64" objcopy_mingw = "//prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/bin/objcopy" mac_buildtool = "//build/toolchain/mac:clang_x64" objcopy_clang = "$clang_base_path/bin/llvm-objcopy" # Defines ace_windows_defines = [ "WINDOWS_PLATFORM" ] ace_mac_defines = [ "MAC_PLATFORM" ] if (enable_glfw_window) { ace_common_defines += [ "USE_GLFW_WINDOW" ] } if ("${product_name}" == "rk3566" || "${product_name}" == "rk3568") { ace_enable_gpu = false # temporary cpu } else { ace_enable_gpu = false } enable_native_view = use_system_skia && (!only_wearable_enable || is_wearable_product) && !use_mingw_win && !use_mac