123b3eb3cSopenharmony_ci# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 223b3eb3cSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 323b3eb3cSopenharmony_ci# you may not use this file except in compliance with the License. 423b3eb3cSopenharmony_ci# You may obtain a copy of the License at 523b3eb3cSopenharmony_ci# 623b3eb3cSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 723b3eb3cSopenharmony_ci# 823b3eb3cSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 923b3eb3cSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1023b3eb3cSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1123b3eb3cSopenharmony_ci# See the License for the specific language governing permissions and 1223b3eb3cSopenharmony_ci# limitations under the License. 1323b3eb3cSopenharmony_ci 1423b3eb3cSopenharmony_ciimport("//build/ohos.gni") 1523b3eb3cSopenharmony_ciimport("//foundation/arkui/ace_engine/ace_config.gni") 1623b3eb3cSopenharmony_ci 1723b3eb3cSopenharmony_ci# build static 1823b3eb3cSopenharmony_citemplate("ace_capability_ohos_source_set") { 1923b3eb3cSopenharmony_ci forward_variables_from(invoker, "*") 2023b3eb3cSopenharmony_ci 2123b3eb3cSopenharmony_ci ohos_source_set(target_name) { 2223b3eb3cSopenharmony_ci subsystem_name = ace_engine_subsystem 2323b3eb3cSopenharmony_ci part_name = ace_engine_part 2423b3eb3cSopenharmony_ci defines += invoker.defines 2523b3eb3cSopenharmony_ci 2623b3eb3cSopenharmony_ci configs = [ "$ace_root:ace_config" ] 2723b3eb3cSopenharmony_ci 2823b3eb3cSopenharmony_ci sources = [ 2923b3eb3cSopenharmony_ci "clipboard/clipboard_impl.cpp", 3023b3eb3cSopenharmony_ci "environment/environment_impl.cpp", 3123b3eb3cSopenharmony_ci "environment/environment_proxy_impl.cpp", 3223b3eb3cSopenharmony_ci "html/html_to_span.cpp", 3323b3eb3cSopenharmony_ci "html/span_to_html.cpp", 3423b3eb3cSopenharmony_ci "package/package_event_proxy_ohos.cpp", 3523b3eb3cSopenharmony_ci "preference/storage_impl.cpp", 3623b3eb3cSopenharmony_ci "time/time_event_proxy_ohos.cpp", 3723b3eb3cSopenharmony_ci ] 3823b3eb3cSopenharmony_ci include_dirs = [] 3923b3eb3cSopenharmony_ci external_deps = [ 4023b3eb3cSopenharmony_ci "ability_base:want", 4123b3eb3cSopenharmony_ci "common_event_service:cesfwk_innerkits", 4223b3eb3cSopenharmony_ci "hicollie:libhicollie", 4323b3eb3cSopenharmony_ci "hilog:libhilog", 4423b3eb3cSopenharmony_ci "ipc:ipc_core", 4523b3eb3cSopenharmony_ci "libxml2:libxml2", 4623b3eb3cSopenharmony_ci "preferences:native_preferences", 4723b3eb3cSopenharmony_ci ] 4823b3eb3cSopenharmony_ci if (defined(config.enable_system_clipboard) && 4923b3eb3cSopenharmony_ci config.enable_system_clipboard) { 5023b3eb3cSopenharmony_ci external_deps += [ "pasteboard:pasteboard_client" ] 5123b3eb3cSopenharmony_ci defines += [ "SYSTEM_CLIPBOARD_SUPPORTED" ] 5223b3eb3cSopenharmony_ci } 5323b3eb3cSopenharmony_ci 5423b3eb3cSopenharmony_ci sources += [ "xcollie/xcollieInterface_impl.cpp" ] 5523b3eb3cSopenharmony_ci if (defined(config.enable_drag_framework) && config.enable_drag_framework) { 5623b3eb3cSopenharmony_ci if (defined(global_parts_info.distributeddatamgr_udmf)) { 5723b3eb3cSopenharmony_ci external_deps += [ "udmf:udmf_client" ] 5823b3eb3cSopenharmony_ci external_deps += [ "udmf:udmf_data_napi" ] 5923b3eb3cSopenharmony_ci external_deps += [ "device_status:devicestatus_client" ] 6023b3eb3cSopenharmony_ci sources += [ "udmf/udmf_impl.cpp" ] 6123b3eb3cSopenharmony_ci sources += [ "interaction/interaction_impl.cpp" ] 6223b3eb3cSopenharmony_ci } 6323b3eb3cSopenharmony_ci external_deps += [ "kv_store:distributeddata_inner" ] 6423b3eb3cSopenharmony_ci } else { 6523b3eb3cSopenharmony_ci sources += [ "//foundation/arkui/ace_engine/adapter/preview/entrance/msdp/interaction_impl.cpp" ] 6623b3eb3cSopenharmony_ci sources += [ "//foundation/arkui/ace_engine/adapter/preview/entrance/udmf/udmf_impl.cpp" ] 6723b3eb3cSopenharmony_ci } 6823b3eb3cSopenharmony_ci if (defined(config.enable_ability_component) && 6923b3eb3cSopenharmony_ci config.enable_ability_component) { 7023b3eb3cSopenharmony_ci if (os_account_exists) { 7123b3eb3cSopenharmony_ci external_deps += [ "os_account:os_account_innerkits" ] 7223b3eb3cSopenharmony_ci } 7323b3eb3cSopenharmony_ci external_deps += [ 7423b3eb3cSopenharmony_ci "ability_base:want", 7523b3eb3cSopenharmony_ci "ability_runtime:abilitykit_native", 7623b3eb3cSopenharmony_ci "ability_runtime:runtime", 7723b3eb3cSopenharmony_ci "bundle_framework:appexecfwk_base", 7823b3eb3cSopenharmony_ci "c_utils:utils", 7923b3eb3cSopenharmony_ci "eventhandler:libeventhandler", 8023b3eb3cSopenharmony_ci "graphic_2d:librender_service_client", 8123b3eb3cSopenharmony_ci "input:libmmi-client", 8223b3eb3cSopenharmony_ci "ipc:ipc_core", 8323b3eb3cSopenharmony_ci "napi:ace_napi", 8423b3eb3cSopenharmony_ci "window_manager:libwindow_extension_client", 8523b3eb3cSopenharmony_ci "window_manager:scene_session", 8623b3eb3cSopenharmony_ci ] 8723b3eb3cSopenharmony_ci sources += [ 8823b3eb3cSopenharmony_ci "window_connection/window_extension_connection_ohos.cpp", 8923b3eb3cSopenharmony_ci "window_connection/window_extension_connection_proxy.cpp", 9023b3eb3cSopenharmony_ci "window_connection_ng/window_extension_connection_ohos_ng.cpp", 9123b3eb3cSopenharmony_ci "window_connection_ng/window_extension_connection_proxy_ng.cpp", 9223b3eb3cSopenharmony_ci ] 9323b3eb3cSopenharmony_ci } 9423b3eb3cSopenharmony_ci } 9523b3eb3cSopenharmony_ci} 9623b3eb3cSopenharmony_ci 9723b3eb3cSopenharmony_ciforeach(item, ace_platforms) { 9823b3eb3cSopenharmony_ci platform = item.name 9923b3eb3cSopenharmony_ci if (platform == "ohos") { 10023b3eb3cSopenharmony_ci ace_capability_ohos_source_set("ace_capability_ohos") { 10123b3eb3cSopenharmony_ci defines = [] 10223b3eb3cSopenharmony_ci config = { 10323b3eb3cSopenharmony_ci } 10423b3eb3cSopenharmony_ci 10523b3eb3cSopenharmony_ci if (defined(item.config)) { 10623b3eb3cSopenharmony_ci config = item.config 10723b3eb3cSopenharmony_ci } 10823b3eb3cSopenharmony_ci if (defined(config.defines)) { 10923b3eb3cSopenharmony_ci defines = config.defines 11023b3eb3cSopenharmony_ci } 11123b3eb3cSopenharmony_ci } 11223b3eb3cSopenharmony_ci } 11323b3eb3cSopenharmony_ci} 114