1# Copyright (c) 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") 15import("//foundation/arkui/ace_engine/ace_config.gni") 16 17ohos_source_set("preview_external_source") { 18 subsystem_name = ace_engine_subsystem 19 part_name = ace_engine_part 20 if (defined(current_platform.name)) { 21 defines = [] 22 cflags_cc = [] 23 config = { 24 } 25 if (defined(current_platform.config)) { 26 config = current_platform.config 27 } 28 if (defined(config.defines)) { 29 defines += config.defines 30 } 31 if (defined(config.cflags_cc)) { 32 cflags_cc += config.cflags_cc 33 } 34 configs = [ "$ace_root:ace_config" ] 35 36 sources = [ 37 # mock ability 38 "ability/context.cpp", 39 "ability/fa/fa_app_info.cpp", 40 "ability/fa/fa_context.cpp", 41 "ability/fa/fa_hap_module_info.cpp", 42 "ability/stage/stage_app_info.cpp", 43 "ability/stage/stage_context.cpp", 44 "ability/stage/stage_hap_module_info.cpp", 45 "ability/stage/stage_pkg_context_info.cpp", 46 ] 47 48 # for rosen backend 49 if (defined(config.enable_rosen_backend) && config.enable_rosen_backend) { 50 # for event loop 51 include_dirs = [ "//third_party/flutter/engine" ] 52 53 # for window 54 external_deps = [ "graphic_2d:librender_service_client" ] 55 } 56 } 57} 58