# 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/ohos.gni") import("//foundation/arkui/ace_engine/ace_config.gni") # build core sources template("ace_core_pipeline_source_set") { forward_variables_from(invoker, "*") ohos_source_set(target_name) { subsystem_name = ace_engine_subsystem part_name = ace_engine_part if (current_os == "ohos") { sanitize = { integer_overflow = true boundary_sanitize = true debug = ace_sanitize_debug } } defines += invoker.defines # add common source file needed by all product platform here sources = [ # context "pipeline_base.cpp", "pipeline_context.cpp", # base component "base/component.cpp", "base/component_group_element.cpp", "base/composed_component.cpp", "base/composed_element.cpp", "base/constants.cpp", "base/element.cpp", "base/element_register.cpp", "base/multi_composed_component.cpp", "base/multi_composed_element.cpp", "base/related_node.cpp", "base/render_context_creator.cpp", "base/render_element.cpp", "base/render_node.cpp", "base/sole_child_element.cpp", # factories "base/factories/render_node_factory.cpp", ] configs = [ "$ace_root:ace_config" ] deps = [ "$ace_root/frameworks/core/components/theme:build_theme_code" ] external_deps = [] if (use_hilog) { external_deps += [ "hilog:libhilog" ] } if (defined(config.enable_rosen_backend) && config.enable_rosen_backend) { sources += [ "base/rosen_render_context.cpp" ] if (is_arkui_x) { deps += [ "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client_static" ] } else { external_deps += [ "graphic_2d:librender_service_client" ] if (ace_use_rosen_drawing) { external_deps += [ "graphic_2d:2d_graphics" ] } } } cflags_cc = [] cflags_cc += invoker.cflags_cc } } foreach(item, ace_platforms) { ace_core_pipeline_source_set("ace_core_pipeline_" + item.name) { if (defined(item.config)) { config = item.config } else { config = { } } if (defined(config.defines)) { defines = config.defines } else { defines = [] } if (defined(config.cflags_cc)) { cflags_cc = config.cflags_cc } else { cflags_cc = [] } } }