1# Copyright (c) 2021-2022 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 17# build static 18template("ace_ohos_standard_source_set") { 19 forward_variables_from(invoker, "*") 20 21 ohos_source_set(target_name) { 22 subsystem_name = ace_engine_subsystem 23 part_name = ace_engine_part 24 defines += invoker.defines 25 cflags_cc += invoker.cflags_cc 26 27 sources = [ 28 "$ace_root/adapter/ohos/entrance/ace_ability.cpp", 29 "$ace_root/adapter/ohos/entrance/ace_application_info.cpp", 30 "$ace_root/adapter/ohos/entrance/ace_container.cpp", 31 "$ace_root/adapter/ohos/entrance/ace_data_ability.cpp", 32 "$ace_root/adapter/ohos/entrance/ace_form_ability.cpp", 33 "$ace_root/adapter/ohos/entrance/ace_new_pipe_judgement.cpp", 34 "$ace_root/adapter/ohos/entrance/ace_service_ability.cpp", 35 "$ace_root/adapter/ohos/entrance/capability_registry.cpp", 36 "$ace_root/adapter/ohos/entrance/data_ability_helper_standard.cpp", 37 "$ace_root/adapter/ohos/entrance/dialog_container.cpp", 38 "$ace_root/adapter/ohos/entrance/file_asset_provider.cpp", 39 "$ace_root/adapter/ohos/entrance/flutter_ace_view.cpp", 40 "$ace_root/adapter/ohos/entrance/form_utils_impl.cpp", 41 "$ace_root/adapter/ohos/entrance/hap_asset_provider.cpp", 42 "$ace_root/adapter/ohos/entrance/pa_container.cpp", 43 "$ace_root/adapter/ohos/entrance/plugin_utils_impl.cpp", 44 "$ace_root/adapter/ohos/entrance/subwindow/subwindow_ohos.cpp", 45 "$ace_root/adapter/ohos/entrance/utils.cpp", 46 47 # innerkits impl 48 "$ace_root/adapter/ohos/entrance/ui_content_impl.cpp", 49 50 # drag window 51 "$ace_root/adapter/ohos/entrance/window/drag_window_ohos.cpp", 52 ] 53 54 if (target_cpu == "arm64") { 55 defines += [ "_ARM64_" ] 56 } 57 if (current_os == "ohos" && current_cpu == "x86_64") { 58 defines += [ "SIMULATOR_64" ] 59 } 60 61 configs = [ "$ace_root:ace_config" ] 62 63 if (defined(config.enable_rosen_backend) && config.enable_rosen_backend) { 64 configs += [ 65 "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:export_config", 66 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:render_service_client_config", 67 ] 68 } 69 70 include_dirs = [ 71 "$ability_runtime_inner_api_path/runtime/include/", 72 "$ability_runtime_napi_path/featureAbility", 73 "//commonlibrary/c_utils/base/include", 74 "//foundation/arkui/napi/interfaces/kits", 75 "//foundation/arkui/napi/native_engine", 76 "//foundation/window/window_manager/interfaces/innerkits", 77 "//third_party/node/src", 78 ] 79 80 deps = [ 81 "$ability_runtime_path/frameworks/native/ability/native:abilitykit_native", 82 "$ability_runtime_path/frameworks/native/ability/native:data_ability_helper", 83 "$ability_runtime_path/frameworks/native/runtime:runtime_extractor", 84 "$ace_flutter_engine_root:third_party_flutter_engine_$platform", 85 "$ace_flutter_engine_root/skia:ace_skia_$platform", 86 "$ace_root/adapter/ohos/capability:ace_capability_ohos", 87 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 88 "//foundation/multimodalinput/input/frameworks/proxy:libmmi-client", 89 "//foundation/multimodalinput/input/frameworks/proxy:libmmi-common", 90 "//third_party/zlib:shared_libz", 91 ] 92 93 public_deps = 94 [ "//base/global/resource_management/frameworks/resmgr:global_resmgr" ] 95 96 external_deps = [ 97 "ability_base:base", 98 "ability_base:configuration", 99 "ability_base:want", 100 "ability_runtime:ability_context_native", 101 "ability_runtime:ability_manager", 102 "data_share:datashare_consumer", 103 "eventhandler:libeventhandler", 104 "form_fwk:fmskit_native", 105 "form_fwk:form_manager", 106 "i18n:intl_util", 107 "ipc:ipc_core", 108 "ipc_js:rpc", 109 "preferences:native_preferences", 110 "relational_store:native_dataability", 111 "relational_store:native_rdb", 112 "window_manager:libdm", 113 "window_manager:libwm", 114 ] 115 } 116} 117 118foreach(item, ace_platforms) { 119 platform = item.name 120 if (platform == "ohos") { 121 ace_ohos_standard_source_set("ace_ohos_standard_entrance") { 122 platform = item.name 123 defines = [] 124 cflags_cc = [] 125 config = { 126 } 127 128 if (defined(item.config)) { 129 config = item.config 130 } 131 132 if (defined(config.defines)) { 133 defines = config.defines 134 } 135 136 if (defined(config.cflags_cc)) { 137 cflags_cc = config.cflags_cc 138 } 139 } 140 } 141} 142