12b7e0694Sopenharmony_ci#Copyright (c) 2021 Huawei Device Co., Ltd. 22b7e0694Sopenharmony_ci#Licensed under the Apache License, Version 2.0 (the "License"); 32b7e0694Sopenharmony_ci#you may not use this file except in compliance with the License. 42b7e0694Sopenharmony_ci#You may obtain a copy of the License at 52b7e0694Sopenharmony_ci# 62b7e0694Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 72b7e0694Sopenharmony_ci# 82b7e0694Sopenharmony_ci#Unless required by applicable law or agreed to in writing, software 92b7e0694Sopenharmony_ci#distributed under the License is distributed on an "AS IS" BASIS, 102b7e0694Sopenharmony_ci#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 112b7e0694Sopenharmony_ci#See the License for the specific language governing permissions and 122b7e0694Sopenharmony_ci#limitations under the License. 132b7e0694Sopenharmony_ci 142b7e0694Sopenharmony_ciimport("//build/lite/config/component/lite_component.gni") 152b7e0694Sopenharmony_ci 162b7e0694Sopenharmony_ciace_common_root = "//foundation/arkui/ace_engine_lite/frameworks/common" 172b7e0694Sopenharmony_ciace_interface_root = 182b7e0694Sopenharmony_ci "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin" 192b7e0694Sopenharmony_ciace_target_root = "//foundation/arkui/ace_engine_lite/frameworks/targets" 202b7e0694Sopenharmony_cinative_engine_root = 212b7e0694Sopenharmony_ci "//foundation/arkui/ace_engine_lite/frameworks/native_engine" 222b7e0694Sopenharmony_ci 232b7e0694Sopenharmony_cilite_component("ace_native_engine_lite") { 242b7e0694Sopenharmony_ci features = [ ":ace_native_engine" ] 252b7e0694Sopenharmony_ci} 262b7e0694Sopenharmony_ci 272b7e0694Sopenharmony_cilite_library("ace_native_engine") { 282b7e0694Sopenharmony_ci if (ohos_kernel_type == "liteos_m") { 292b7e0694Sopenharmony_ci target_type = "static_library" 302b7e0694Sopenharmony_ci if (defined(board_toolchain_type) && board_toolchain_type == "iccarm") { 312b7e0694Sopenharmony_ci cflags = [ 322b7e0694Sopenharmony_ci "--diag_suppress", 332b7e0694Sopenharmony_ci "Pa137,Pe226", 342b7e0694Sopenharmony_ci ] 352b7e0694Sopenharmony_ci cflags_cc = cflags 362b7e0694Sopenharmony_ci } 372b7e0694Sopenharmony_ci } else { 382b7e0694Sopenharmony_ci target_type = "shared_library" 392b7e0694Sopenharmony_ci } 402b7e0694Sopenharmony_ci 412b7e0694Sopenharmony_ci include_dirs = [ 422b7e0694Sopenharmony_ci "$ace_common_root/log", 432b7e0694Sopenharmony_ci "$ace_common_root/memory", 442b7e0694Sopenharmony_ci "$ace_interface_root/async", 452b7e0694Sopenharmony_ci "$ace_interface_root/base", 462b7e0694Sopenharmony_ci "$ace_interface_root/jsi", 472b7e0694Sopenharmony_ci "//base/hiviewdfx/hilog_lite/interfaces/native/kits", 482b7e0694Sopenharmony_ci "//third_party/jerryscript/jerry-core/include", 492b7e0694Sopenharmony_ci "//foundation/arkui/ace_engine_lite/frameworks/include/base", 502b7e0694Sopenharmony_ci "//foundation/ability/ability_lite/interfaces/kits/ability_lite/slite", 512b7e0694Sopenharmony_ci "//foundation/ability/ability_lite/interfaces/kits/want_lite", 522b7e0694Sopenharmony_ci "//foundation/bundlemanager/bundle_framework_lite/interfaces/kits/bundle_lite", 532b7e0694Sopenharmony_ci ] 542b7e0694Sopenharmony_ci 552b7e0694Sopenharmony_ci deps = [ "$ace_target_root" ] 562b7e0694Sopenharmony_ci 572b7e0694Sopenharmony_ci sources = [ 582b7e0694Sopenharmony_ci "$native_engine_root/async/js_async_work.cpp", 592b7e0694Sopenharmony_ci "$native_engine_root/async/message_queue_utils.cpp", 602b7e0694Sopenharmony_ci "$native_engine_root/jsi/jsi.cpp", 612b7e0694Sopenharmony_ci ] 622b7e0694Sopenharmony_ci 632b7e0694Sopenharmony_ci public_deps = [ "$ace_common_root:ace_common_lite" ] 642b7e0694Sopenharmony_ci 652b7e0694Sopenharmony_ci if (ohos_kernel_type == "liteos_m") { 662b7e0694Sopenharmony_ci public_deps += [ 672b7e0694Sopenharmony_ci "//foundation/arkui/ui_lite:ui", 682b7e0694Sopenharmony_ci "//third_party/jerryscript:jerry_engine", 692b7e0694Sopenharmony_ci ] 702b7e0694Sopenharmony_ci } else { 712b7e0694Sopenharmony_ci public_deps += [ "//third_party/jerryscript/jerry-core:jerry-core_shared" ] 722b7e0694Sopenharmony_ci } 732b7e0694Sopenharmony_ci} 74