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