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_capability_ohos_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 26 configs = [ "$ace_root:ace_config" ] 27 28 sources = [ 29 "clipboard/clipboard_impl.cpp", 30 "distributed/storage/distributed_storage.cpp", 31 "environment/environment_impl.cpp", 32 "environment/environment_proxy_impl.cpp", 33 "preference/storage_impl.cpp", 34 ] 35 include_dirs = [] 36 external_deps = [ 37 "ability_base:want", 38 "data_object:distributeddataobject_impl", 39 "ipc:ipc_core", 40 "preferences:native_preferences", 41 ] 42 if (defined(config.enable_system_clipboard) && 43 config.enable_system_clipboard) { 44 external_deps += [ "pasteboard:pasteboard_client" ] 45 defines += [ "SYSTEM_CLIPBOARD_SUPPORTED" ] 46 } 47 if (defined(config.enable_ability_component) && 48 config.enable_ability_component) { 49 external_deps += [ 50 "ability_base:want", 51 "ability_runtime:ability_manager", 52 "ability_runtime:abilitykit_native", 53 "ability_runtime:runtime", 54 "bundle_framework:appexecfwk_base", 55 "c_utils:utils", 56 "eventhandler:libeventhandler", 57 "graphic_standard:surface", 58 "hiviewdfx_hilog_native:libhilog", 59 "input:libmmi-client", 60 "ipc:ipc_core", 61 "window_manager:libwindow_extension_client", 62 ] 63 deps = [ "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client" ] 64 sources += [ 65 "window_connection/window_extension_connection_ohos.cpp", 66 "window_connection/window_extension_connection_proxy.cpp", 67 "window_connection_ng/window_extension_connection_ohos_ng.cpp", 68 "window_connection_ng/window_extension_connection_proxy_ng.cpp", 69 ] 70 } 71 } 72} 73 74foreach(item, ace_platforms) { 75 platform = item.name 76 if (platform == "ohos") { 77 ace_capability_ohos_source_set("ace_capability_ohos") { 78 defines = [] 79 config = { 80 } 81 82 if (defined(item.config)) { 83 config = item.config 84 } 85 if (defined(config.defines)) { 86 defines = config.defines 87 } 88 } 89 } 90} 91