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_ciif (!is_arkui_x) { 1823b3eb3cSopenharmony_ci ohos_ndk_headers("ace_header") { 1923b3eb3cSopenharmony_ci dest_dir = "$ndk_headers_out_dir/ace/xcomponent/" 2023b3eb3cSopenharmony_ci sources = [ 2123b3eb3cSopenharmony_ci "native_interface_xcomponent.h", 2223b3eb3cSopenharmony_ci "native_xcomponent_key_event.h", 2323b3eb3cSopenharmony_ci ] 2423b3eb3cSopenharmony_ci } 2523b3eb3cSopenharmony_ci 2623b3eb3cSopenharmony_ci ohos_ndk_library("libace_ndk_rom") { 2723b3eb3cSopenharmony_ci ndk_description_file = "./libace.ndk.json" 2823b3eb3cSopenharmony_ci min_compact_version = "7" 2923b3eb3cSopenharmony_ci output_name = "ace_ndk" 3023b3eb3cSopenharmony_ci } 3123b3eb3cSopenharmony_ci} 3223b3eb3cSopenharmony_ci 3323b3eb3cSopenharmony_ciconfig("ace_ndk_public_configs") { 3423b3eb3cSopenharmony_ci include_dirs = [ "$ace_root/interfaces" ] 3523b3eb3cSopenharmony_ci} 3623b3eb3cSopenharmony_ci 3723b3eb3cSopenharmony_ciohos_shared_library("ace_ndk") { 3823b3eb3cSopenharmony_ci if (current_os == "ohos") { 3923b3eb3cSopenharmony_ci sanitize = { 4023b3eb3cSopenharmony_ci integer_overflow = true 4123b3eb3cSopenharmony_ci boundary_sanitize = true 4223b3eb3cSopenharmony_ci debug = ace_sanitize_debug 4323b3eb3cSopenharmony_ci } 4423b3eb3cSopenharmony_ci } 4523b3eb3cSopenharmony_ci include_dirs = [ 4623b3eb3cSopenharmony_ci "//foundation/arkui/ace_engine", 4723b3eb3cSopenharmony_ci "//foundation/arkui/ace_engine/frameworks", 4823b3eb3cSopenharmony_ci "//foundation/arkui/ace_engine/interfaces/native", 4923b3eb3cSopenharmony_ci ] 5023b3eb3cSopenharmony_ci 5123b3eb3cSopenharmony_ci public_configs = [ ":ace_ndk_public_configs" ] 5223b3eb3cSopenharmony_ci 5323b3eb3cSopenharmony_ci sources = [ 5423b3eb3cSopenharmony_ci "//foundation/arkui/ace_engine/frameworks/core/accessibility/native_interface_accessibility_impl.cpp", 5523b3eb3cSopenharmony_ci "//foundation/arkui/ace_engine/frameworks/core/accessibility/native_interface_accessibility_provider.cpp", 5623b3eb3cSopenharmony_ci "//foundation/arkui/ace_engine/frameworks/core/components/common/properties/color.cpp", 5723b3eb3cSopenharmony_ci "//foundation/arkui/ace_engine/frameworks/core/components/xcomponent/native_interface_xcomponent_impl.cpp", 5823b3eb3cSopenharmony_ci "event/drag_and_drop_impl.cpp", 5923b3eb3cSopenharmony_ci "event/ui_input_event.cpp", 6023b3eb3cSopenharmony_ci "native_interface_accessibility.cpp", 6123b3eb3cSopenharmony_ci "native_interface_xcomponent.cpp", 6223b3eb3cSopenharmony_ci "native_styled_string_descriptor.cpp", 6323b3eb3cSopenharmony_ci "node/animate_impl.cpp", 6423b3eb3cSopenharmony_ci "node/dialog_model.cpp", 6523b3eb3cSopenharmony_ci "node/drawable_descriptor.cpp", 6623b3eb3cSopenharmony_ci "node/event_converter.cpp", 6723b3eb3cSopenharmony_ci "node/frame_information.cpp", 6823b3eb3cSopenharmony_ci "node/gesture_impl.cpp", 6923b3eb3cSopenharmony_ci "node/list_option.cpp", 7023b3eb3cSopenharmony_ci "node/native_drawable_descriptor.cpp", 7123b3eb3cSopenharmony_ci "node/native_impl.cpp", 7223b3eb3cSopenharmony_ci "node/native_node_extented.cpp", 7323b3eb3cSopenharmony_ci "node/native_node_napi.cpp", 7423b3eb3cSopenharmony_ci "node/node_adapter_impl.cpp", 7523b3eb3cSopenharmony_ci "node/node_animate.cpp", 7623b3eb3cSopenharmony_ci "node/node_extened.cpp", 7723b3eb3cSopenharmony_ci "node/node_model.cpp", 7823b3eb3cSopenharmony_ci "node/node_node_relative_container.cpp", 7923b3eb3cSopenharmony_ci "node/node_transition.cpp", 8023b3eb3cSopenharmony_ci "node/node_transition_imp.cpp", 8123b3eb3cSopenharmony_ci "node/node_utils.cpp", 8223b3eb3cSopenharmony_ci "node/style_modifier.cpp", 8323b3eb3cSopenharmony_ci "node/waterflow_section_option.cpp", 8423b3eb3cSopenharmony_ci ] 8523b3eb3cSopenharmony_ci external_deps = [ "bounds_checking_function:libsec_shared" ] 8623b3eb3cSopenharmony_ci deps = [] 8723b3eb3cSopenharmony_ci cflags_cc = [ "-Wno-missing-braces" ] 8823b3eb3cSopenharmony_ci 8923b3eb3cSopenharmony_ci if (target_os == "ohos") { 9023b3eb3cSopenharmony_ci defines = [ 9123b3eb3cSopenharmony_ci "OHOS_PLATFORM", 9223b3eb3cSopenharmony_ci "USE_HILOG", 9323b3eb3cSopenharmony_ci ] 9423b3eb3cSopenharmony_ci sources += [ "$ace_root/adapter/ohos/osal/log_wrapper.cpp" ] 9523b3eb3cSopenharmony_ci deps += [ 9623b3eb3cSopenharmony_ci ":libace_ndk_rom", 9723b3eb3cSopenharmony_ci "$ace_root/interfaces/inner_api/drawable_descriptor:drawable_descriptor", 9823b3eb3cSopenharmony_ci ] 9923b3eb3cSopenharmony_ci external_deps += [ 10023b3eb3cSopenharmony_ci "graphic_2d:native_drawing_ndk", 10123b3eb3cSopenharmony_ci "hilog:libhilog", 10223b3eb3cSopenharmony_ci "image_framework:pixelmap", 10323b3eb3cSopenharmony_ci "napi:ace_napi", 10423b3eb3cSopenharmony_ci "resource_management:global_resmgr", 10523b3eb3cSopenharmony_ci "udmf:udmf_client", 10623b3eb3cSopenharmony_ci ] 10723b3eb3cSopenharmony_ci version_script = 10823b3eb3cSopenharmony_ci get_label_info(":libace_ndk_rom", "target_gen_dir") + "/" + 10923b3eb3cSopenharmony_ci get_label_info(":libace_ndk_rom", "name") + version_script_suffix 11023b3eb3cSopenharmony_ci } else if (target_os == "android") { 11123b3eb3cSopenharmony_ci sources += [ "$ace_root/adapter/android/osal/log_wrapper.cpp" ] 11223b3eb3cSopenharmony_ci libs = [ "log" ] 11323b3eb3cSopenharmony_ci } 11423b3eb3cSopenharmony_ci 11523b3eb3cSopenharmony_ci subsystem_name = ace_engine_subsystem 11623b3eb3cSopenharmony_ci part_name = ace_engine_part 11723b3eb3cSopenharmony_ci} 11823b3eb3cSopenharmony_ci 11923b3eb3cSopenharmony_ciif (is_arkui_x) { 12023b3eb3cSopenharmony_ci ohos_source_set("ace_static_ndk") { 12123b3eb3cSopenharmony_ci include_dirs = [ 12223b3eb3cSopenharmony_ci "$ace_root", 12323b3eb3cSopenharmony_ci "$ace_root/frameworks", 12423b3eb3cSopenharmony_ci "$ace_root/interfaces/native", 12523b3eb3cSopenharmony_ci ] 12623b3eb3cSopenharmony_ci 12723b3eb3cSopenharmony_ci sources = [ 12823b3eb3cSopenharmony_ci "$ace_root/frameworks/core/components/xcomponent/native_interface_xcomponent_impl.cpp", 12923b3eb3cSopenharmony_ci "native_interface_xcomponent.cpp", 13023b3eb3cSopenharmony_ci ] 13123b3eb3cSopenharmony_ci 13223b3eb3cSopenharmony_ci deps = [ "//third_party/bounds_checking_function:libsec_static" ] 13323b3eb3cSopenharmony_ci 13423b3eb3cSopenharmony_ci cflags_cc = [ "-Wno-missing-braces" ] 13523b3eb3cSopenharmony_ci 13623b3eb3cSopenharmony_ci print("ace_static_ndk build.") 13723b3eb3cSopenharmony_ci subsystem_name = ace_engine_subsystem 13823b3eb3cSopenharmony_ci part_name = ace_engine_part 13923b3eb3cSopenharmony_ci } 14023b3eb3cSopenharmony_ci} 14123b3eb3cSopenharmony_ci 14223b3eb3cSopenharmony_cigroup("ace_packages_ndk") { 14323b3eb3cSopenharmony_ci deps = [ ":ace_ndk" ] 14423b3eb3cSopenharmony_ci} 145