arkui_ace_engine/interfaces/native/BUILD.gn
sunfei bea1888047 support cross-platform build
Signed-off-by: sunfei <sunfei.sun@huawei.com>
Change-Id: I035e8d782b4df2cd90649ad586d7ef11d6436646
2022-01-27 12:33:37 +08:00

65 lines
1.9 KiB
Plaintext

# Copyright (c) 2021 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/ace/ace_engine/ace_config.gni")
if (!is_cross_platform_build) {
ohos_ndk_headers("ace_header") {
dest_dir = "$ndk_headers_out_dir/ace/xcomponent/"
sources = [ "native_interface_xcomponent.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") {
include_dirs = [
"//foundation/ace/ace_engine",
"//foundation/ace/ace_engine/frameworks",
"//foundation/ace/ace_engine/interfaces/native",
]
sources = [
"$ace_root/adapter/ohos/osal/log_wrapper.cpp",
"//foundation/ace/ace_engine/frameworks/core/components/xcomponent/native_interface_xcomponent_impl.cpp",
"native_interface_xcomponent.cpp",
]
deps = [
":libace_ndk",
"//utils/native/base:utilsecurec",
]
cflags_cc = [ "-Wno-missing-braces" ]
if (is_standard_system) {
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
} else {
external_deps = [ "hilog:libhilog" ]
}
version_script = get_label_info(":libace_ndk", "target_gen_dir") + "/" +
get_label_info(":libace_ndk", "name") + version_script_suffix
subsystem_name = "ace"
part_name = ace_engine_part
}
group("ace_packages_ndk") {
deps = [ ":ace_ndk" ]
}