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