# Copyright (c) 2021-2022 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 static template("ace_capability_ohos_source_set") { forward_variables_from(invoker, "*") ohos_source_set(target_name) { subsystem_name = ace_engine_subsystem part_name = ace_engine_part defines += invoker.defines configs = [ "$ace_root:ace_config" ] sources = [ "clipboard/clipboard_impl.cpp", "environment/environment_impl.cpp", "environment/environment_proxy_impl.cpp", "html/html_to_span.cpp", "html/span_to_html.cpp", "package/package_event_proxy_ohos.cpp", "preference/storage_impl.cpp", "time/time_event_proxy_ohos.cpp", ] include_dirs = [] external_deps = [ "ability_base:want", "common_event_service:cesfwk_innerkits", "hicollie:libhicollie", "hilog:libhilog", "ipc:ipc_core", "libxml2:libxml2", "preferences:native_preferences", ] if (defined(config.enable_system_clipboard) && config.enable_system_clipboard) { external_deps += [ "pasteboard:pasteboard_client" ] defines += [ "SYSTEM_CLIPBOARD_SUPPORTED" ] } sources += [ "xcollie/xcollieInterface_impl.cpp" ] if (defined(config.enable_drag_framework) && config.enable_drag_framework) { if (defined(global_parts_info.distributeddatamgr_udmf)) { external_deps += [ "udmf:udmf_client" ] external_deps += [ "udmf:udmf_data_napi" ] external_deps += [ "device_status:devicestatus_client" ] sources += [ "udmf/udmf_impl.cpp" ] sources += [ "interaction/interaction_impl.cpp" ] } external_deps += [ "kv_store:distributeddata_inner" ] } else { sources += [ "//foundation/arkui/ace_engine/adapter/preview/entrance/msdp/interaction_impl.cpp" ] sources += [ "//foundation/arkui/ace_engine/adapter/preview/entrance/udmf/udmf_impl.cpp" ] } if (defined(config.enable_ability_component) && config.enable_ability_component) { if (os_account_exists) { external_deps += [ "os_account:os_account_innerkits" ] } external_deps += [ "ability_base:want", "ability_runtime:abilitykit_native", "ability_runtime:runtime", "bundle_framework:appexecfwk_base", "c_utils:utils", "eventhandler:libeventhandler", "graphic_2d:librender_service_client", "input:libmmi-client", "ipc:ipc_core", "napi:ace_napi", "window_manager:libwindow_extension_client", "window_manager:scene_session", ] sources += [ "window_connection/window_extension_connection_ohos.cpp", "window_connection/window_extension_connection_proxy.cpp", "window_connection_ng/window_extension_connection_ohos_ng.cpp", "window_connection_ng/window_extension_connection_proxy_ng.cpp", ] } } } foreach(item, ace_platforms) { platform = item.name if (platform == "ohos") { ace_capability_ohos_source_set("ace_capability_ohos") { defines = [] config = { } if (defined(item.config)) { config = item.config } if (defined(config.defines)) { defines = config.defines } } } }