# 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") if (!is_arkui_x) { ohos_ndk_headers("ace_header") { dest_dir = "$ndk_headers_out_dir/ace/xcomponent/" sources = [ "native_interface_xcomponent.h", "native_xcomponent_key_event.h", ] } ohos_ndk_library("libace_ndk") { ndk_description_file = "./libace.ndk.json" min_compact_version = "7" output_name = "ace_ndk" } } ohos_shared_library("ace_ndk") { if (current_os == "ohos") { sanitize = { integer_overflow = true boundary_sanitize = true debug = ace_sanitize_debug } } include_dirs = [ "//foundation/arkui/ace_engine", "//foundation/arkui/ace_engine/frameworks", "//foundation/arkui/ace_engine/interfaces/native", ] sources = [ "//foundation/arkui/ace_engine/frameworks/core/components/common/properties/color.cpp", "//foundation/arkui/ace_engine/frameworks/core/components/xcomponent/native_interface_xcomponent_impl.cpp", "native_interface_xcomponent.cpp", "node/event_converter.cpp", "node/native_impl.cpp", "node/node_model.cpp", "node/style_modifier.cpp", ] deps = [ "//third_party/bounds_checking_function:libsec_shared" ] cflags_cc = [ "-Wno-missing-braces" ] if (target_os == "ohos") { sources += [ "$ace_root/adapter/ohos/osal/log_wrapper.cpp" ] deps += [ ":libace_ndk" ] external_deps = [ "hilog:libhilog" ] version_script = get_label_info(":libace_ndk", "target_gen_dir") + "/" + get_label_info(":libace_ndk", "name") + version_script_suffix } else if (target_os == "android") { sources += [ "$ace_root/adapter/android/osal/log_wrapper.cpp" ] libs = [ "log" ] } subsystem_name = ace_engine_subsystem part_name = ace_engine_part } group("ace_packages_ndk") { deps = [ ":ace_ndk" ] }