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 "rich/JsAppImpl.cpp", 36 ] 37 include_dirs = [ 38 ".", 39 "rich/", 40 "../mock/rich/", 41 "../util/", 42 "../mock/", 43 "//third_party/jsoncpp/include/json/", 44 "./external/", 45 ] 46 include_dirs += os_include_dirs 47 deps = [ 48 "rich/external:ide_extension", 49 "//third_party/libwebsockets:websockets_static", 50 ] 51 external_deps = [ 52 "ace_engine:libace", 53 "graphic_2d:librender_service_client", 54 "window_manager:previewer_window", 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 "lite/JsAppImpl.cpp", 72 "lite/TimerTaskHandler.cpp", 73 ] 74 include_dirs = [ 75 ".", 76 "lite/", 77 "../mock/lite/", 78 "../util/", 79 "../mock/", 80 "../cli", 81 "//third_party/jsoncpp/include/json/", 82 "//foundation/arkui/ui_lite/interfaces/innerkits/", 83 "//foundation/arkui/ui_lite/interfaces/kits/", 84 "//foundation/graphic/graphic_utils_lite/interfaces/innerkits/", 85 "//foundation/graphic/graphic_utils_lite/interfaces/kits/", 86 "//foundation/arkui/ui_lite/frameworks/", 87 "//foundation/arkui/ui_lite/frameworks/dock/", 88 "//foundation/arkui/ui_lite/interfaces/innerkits/dock/", 89 ] 90 if (build_lite_full) { 91 include_dirs += [ 92 "//base/sensors/sensorjs_lite/sensor_lite/interfaces/js/builtin/sensor/include/", 93 "//base/location/interfaces/kits/geo_lite/js/builtin/include/", 94 ] 95 } 96 deps = [ 97 "//foundation/arkui/ace_engine_lite/frameworks/targets/simulator:ace_lite", 98 "//third_party/libwebsockets:websockets_static", 99 ] 100 part_name = "previewer" 101 subsystem_name = "ide" 102} 103