1#Copyright (c) 2021 Huawei Device Co., Ltd. 2#Licensed under the Apache License, Version 2.0 (the "License"); 3#you may not use this file except in compliance with the License. 4#You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8#Unless required by applicable law or agreed to in writing, software 9#distributed under the License is distributed on an "AS IS" BASIS, 10#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11#See the License for the specific language governing permissions and 12#limitations under the License. 13 14import("//build/lite/config/subsystem/aafwk/config.gni") 15import("//build/ohos.gni") 16import("//foundation/arkui/ace_engine_lite/ace_lite.gni") 17import("//foundation/arkui/ace_engine_lite/simulator.gni") 18if (os_level == "standard") { 19 config("ace_lite_config") { 20 include_dirs = ace_lite_include_dirs_simulator 21 include_dirs += ace_lite_include_dirs 22 include_dirs += 23 [ "//foundation/arkui/ace_engine_lite/frameworks/targets/simulator" ] 24 } 25 26 ohos_static_library("ace_lite") { 27 public_configs = [ ":ace_lite_config" ] 28 sources = ace_lite_sources 29 sources += [ 30 "$ACE_LITE_COMMON_PATH/log/ace_log.cpp", 31 "$ACE_LITE_COMMON_PATH/memory/ace_mem_base.cpp", 32 "$ACE_LITE_COMMON_PATH/memory/cache/cache_manager.cpp", 33 "$ACE_LITE_COMMON_PATH/memory/mem_proc.cpp", 34 "$ACE_LITE_COMMON_PATH/memory/memory_heap.cpp", 35 "$MODULE_MANAGER_PATH/module_manager.cpp", 36 "$NATIVE_ENGINE_PATH/jsi/jsi.cpp", 37 "//foundation/arkui/ace_engine_lite/frameworks/src/core/modules/presets/feature_ability_module.cpp", 38 ] 39 sources -= [ "//foundation/arkui/ace_engine_lite/frameworks/src/core/context/ace_ability.cpp" ] 40 cflags_cc = [ 41 "-D_INC_STRING_S", 42 "-D_INC_WCHAR_S", 43 "-D_SECIMP=//", 44 "-D_STDIO_S_DEFINED", 45 "-D_INC_STDIO_S", 46 "-D_INC_STDLIB_S", 47 "-D_INC_MEMORY_S", 48 ] 49 deps = [ 50 "//base/global/resource_management_lite/frameworks/resmgr_lite:global_resmgr_simulator", 51 "//foundation/arkui/ui_lite/ext/ide:ui_ide", 52 "//third_party/bounds_checking_function:libsec_static", 53 "//third_party/jerryscript:libjerryscript", 54 ] 55 defines = [ 56 "TARGET_SIMULATOR=1", 57 "JS_ENGINE_EXTERNAL_CONTEXT=1", 58 "SCREENSIZE_SPECIFIED=1", 59 "MOCK_JS_ASYNC_WORK=1", 60 ] 61 if (build_lite_full) { 62 defines += [ "LITEWEARABLE_SUPPORTED=1" ] 63 } 64 if (is_debug == "debug") { 65 defines += [ "JS_PROFILER=1" ] 66 } else { 67 defines += [ "JS_PROFILER=0" ] 68 } 69 if (enable_ohos_appexecfwk_feature_ability == true) { 70 defines += [ "ABILITY_WINDOW_SUPPORT" ] 71 } 72 } 73} else { 74 group("ace_lite") { 75 } 76} 77