# Copyright (c) 2022 Huawei Device Co., Ltd.. All rights reserved. # 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") import("//foundation/arkui/ace_engine/ace_config.gni") import("$graphic_2d_root/rosen/modules/2d_engine/rosen_text/config.gni") config("rosen_text_config") { cflags_cc = [ "-Wno-implicit-fallthrough", "-Os", ] include_dirs = [ "$rosen_2d_engine_root", "//third_party_icu/icu4c/source/common", ] if (defined(use_new_skia) && use_new_skia) { include_dirs += [ "$flutter_root/txt/src" ] } else { include_dirs += [ "$flutter_root/engine/flutter/third_party/txt/src" ] } } template("rosen_text_properties") { forward_variables_from(invoker, "*") ohos_source_set(target_name) { defines += invoker.defines cflags_cc += invoker.cflags_cc public_configs = [ "$ace_flutter_engine_root/icu:icu_config_$platform", "$ace_flutter_engine_root:flutter_config", ":rosen_text_config", ] sources = [ "font_collection_txt.cpp", "placeholder_run.cpp", "rosen_converter_txt.cpp", "text_style.cpp", "typography_create_txt.cpp", "typography_style.cpp", "typography_txt.cpp", ] public_deps = [ "//third_party/flutter/build/libtxt:thirdparty_lib_txt_$current_os" ] part_name = "graphic_2d" subsystem_name = "graphic" } } foreach(item, ace_platforms) { rosen_text_properties("rosen_text_properties_" + item.name) { platform = item.name defines = [] cflags_cc = [] config = { } if (defined(item.config)) { config = item.config } if (defined(config.defines)) { defines = config.defines } if (defined(config.cflags_cc)) { cflags_cc = config.cflags_cc } } }