• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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")
17if (os_level == "standard") {
18  config("ace_lite_config") {
19    include_dirs = ace_lite_include_dirs_simulator
20    include_dirs += ace_lite_include_dirs
21    include_dirs +=
22        [ "//foundation/arkui/ace_engine_lite/frameworks/targets/simulator" ]
23  }
24
25  ohos_static_library("ace_lite") {
26    public_configs = [ ":ace_lite_config" ]
27    sources = ace_lite_sources
28    sources += [
29      "$ACE_LITE_COMMON_PATH/log/ace_log.cpp",
30      "$ACE_LITE_COMMON_PATH/memory/ace_mem_base.cpp",
31      "$ACE_LITE_COMMON_PATH/memory/cache/cache_manager.cpp",
32      "$ACE_LITE_COMMON_PATH/memory/mem_proc.cpp",
33      "$ACE_LITE_COMMON_PATH/memory/memory_heap.cpp",
34      "$MODULE_MANAGER_PATH/module_manager.cpp",
35      "$NATIVE_ENGINE_PATH/jsi/jsi.cpp",
36      "//foundation/arkui/ace_engine_lite/frameworks/src/core/modules/presets/feature_ability_module.cpp",
37    ]
38    sources -= [ "//foundation/arkui/ace_engine_lite/frameworks/src/core/context/ace_ability.cpp" ]
39    cflags_cc = [
40      "-D_INC_STRING_S",
41      "-D_INC_WCHAR_S",
42      "-D_SECIMP=//",
43      "-D_STDIO_S_DEFINED",
44      "-D_INC_STDIO_S",
45      "-D_INC_STDLIB_S",
46      "-D_INC_MEMORY_S",
47    ]
48    deps = [
49      "//base/global/resource_management_lite/frameworks/resmgr_lite:global_resmgr_simulator",
50      "//foundation/arkui/ui_lite/ext/ide:ui_ide",
51      "//third_party/bounds_checking_function:libsec_static",
52      "//third_party/jerryscript:libjerryscript",
53    ]
54    defines = [
55      "TARGET_SIMULATOR=1",
56      "JS_ENGINE_EXTERNAL_CONTEXT=1",
57      "SCREENSIZE_SPECIFIED=1",
58      "MOCK_JS_ASYNC_WORK=1",
59    ]
60    if (is_debug == "debug") {
61      defines += [ "JS_PROFILER=1" ]
62    } else {
63      defines += [ "JS_PROFILER=0" ]
64    }
65    if (enable_ohos_appexecfwk_feature_ability == true) {
66      defines += [ "ABILITY_WINDOW_SUPPORT" ]
67    }
68  }
69} else {
70  group("ace_lite") {
71  }
72}
73