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 configs = [ ":jsapp_config" ] 35 sources = [ 36 "JsApp.cpp", 37 "rich/JsAppImpl.cpp", 38 ] 39 include_dirs = [ 40 ".", 41 "rich/", 42 "../mock/rich/", 43 "../cli/", 44 "../util/", 45 "../mock/", 46 "./external/", 47 ] 48 include_dirs += os_include_dirs 49 deps = [ 50 "rich/external:ide_extension", 51 "//third_party/libwebsockets:websockets_static", 52 ] 53 external_deps = [ 54 "ace_engine:libace_compatible", 55 "graphic_2d:librender_service_client", 56 "window_manager:previewer_window", 57 ] 58 if (platform != "linux_x64") { 59 external_deps += [ "ability_runtime:ability_simulator" ] 60 } 61 part_name = "previewer" 62 subsystem_name = "ide" 63} 64 65ohos_source_set("jsapp_lite") { 66 defines = [ "ENABLE_ICU" ] 67 if (build_lite_full) { 68 defines += [ "LITEWEARABLE_SUPPORTED=1" ] 69 } 70 configs = [ ":jsapp_config" ] 71 configs += [ "//third_party/freetype:freetype_config" ] 72 sources = [ 73 "JsApp.cpp", 74 "lite/JsAppImpl.cpp", 75 "lite/TimerTaskHandler.cpp", 76 ] 77 include_dirs = [ 78 ".", 79 "lite/", 80 "../mock/lite/", 81 "../util/", 82 "../mock/", 83 "../cli", 84 "//foundation/arkui/ui_lite/interfaces/innerkits/", 85 "//foundation/arkui/ui_lite/interfaces/kits/", 86 "//foundation/graphic/graphic_utils_lite/interfaces/innerkits/", 87 "//foundation/graphic/graphic_utils_lite/interfaces/kits/", 88 "//foundation/arkui/ui_lite/frameworks/", 89 "//foundation/arkui/ui_lite/frameworks/dock/", 90 "//foundation/arkui/ui_lite/interfaces/innerkits/dock/", 91 ] 92 if (build_lite_full) { 93 include_dirs += [ 94 "//base/sensors/sensorjs_lite/sensor_lite/interfaces/js/builtin/sensor/include/", 95 "//base/location/interfaces/kits/geo_lite/js/builtin/include/", 96 ] 97 } 98 deps = [ 99 "//foundation/arkui/ace_engine_lite/frameworks/targets/simulator:ace_lite", 100 "//third_party/libwebsockets:websockets_static", 101 ] 102 part_name = "previewer" 103 subsystem_name = "ide" 104} 105