• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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/ohos.gni")
15import("//foundation/arkui/ace_engine_lite/simulator.gni")
16import("../gn/config.gni")
17
18config("jsapp_config") {
19  cflags = [
20    "-std=c++17",
21    "-Wall",
22    "-Wno-deprecated-declarations",
23  ]
24  cflags_cc = cflags
25}
26
27config("jsapp_config_rich") {
28  visibility = [ ":*" ]
29
30  include_dirs = [ "rich" ]
31}
32
33ohos_source_set("jsapp_rich") {
34  defines = []
35  if (platform == "mingw_x86_64" && defined(enable_component_test) &&
36      enable_component_test) {
37    defines += [ "COMPONENT_TEST_ENABLED" ]
38  }
39  configs = [ ":jsapp_config" ]
40  sources = [
41    "JsApp.cpp",
42    "rich/JsAppImpl.cpp",
43  ]
44  include_dirs = [
45    ".",
46    "rich/",
47    "../mock/rich/",
48    "../cli/",
49    "../util/",
50    "../mock/",
51    "./external/",
52  ]
53  include_dirs += os_include_dirs
54  deps = [
55    "rich/external:ide_extension",
56    "//third_party/libwebsockets:websockets_static",
57  ]
58
59  external_deps = [
60    "ace_engine:libace_compatible",
61    "graphic_2d:libglfw_render_context",
62    "graphic_2d:librender_service_client",
63    "window_manager:previewer_window",
64  ]
65  if (platform != "linux_x64") {
66    external_deps += [ "ability_runtime:ability_simulator" ]
67  }
68  part_name = "previewer"
69  subsystem_name = "ide"
70}
71
72ohos_source_set("jsapp_lite") {
73  defines = [ "ENABLE_ICU" ]
74  if (build_lite_full) {
75    defines += [ "LITEWEARABLE_SUPPORTED=1" ]
76  }
77  configs = [ ":jsapp_config" ]
78  configs += [ "//third_party/freetype:freetype_config" ]
79  sources = [
80    "JsApp.cpp",
81    "lite/JsAppImpl.cpp",
82    "lite/TimerTaskHandler.cpp",
83  ]
84  include_dirs = [
85    ".",
86    "lite/",
87    "../mock/lite/",
88    "../util/",
89    "../mock/",
90    "../cli",
91    "//foundation/arkui/ui_lite/interfaces/innerkits/",
92    "//foundation/arkui/ui_lite/interfaces/kits/",
93    "//foundation/graphic/graphic_utils_lite/interfaces/innerkits/",
94    "//foundation/graphic/graphic_utils_lite/interfaces/kits/",
95    "//foundation/arkui/ui_lite/frameworks/",
96    "//foundation/arkui/ui_lite/frameworks/dock/",
97    "//foundation/arkui/ui_lite/interfaces/innerkits/dock/",
98  ]
99  if (build_lite_full) {
100    include_dirs += [
101      "//base/sensors/sensorjs_lite/sensor_lite/interfaces/js/builtin/sensor/include/",
102      "//base/location/interfaces/kits/geo_lite/js/builtin/include/",
103    ]
104  }
105  deps = [
106    "//foundation/arkui/ace_engine_lite/frameworks/targets/simulator:ace_lite",
107    "//third_party/libwebsockets:websockets_static",
108  ]
109  part_name = "previewer"
110  subsystem_name = "ide"
111}
112