1# Copyright (c) 2021-2022 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/ace/ace_args.gni") 15import("//foundation/graphic/graphic_2d/graphic_config.gni") 16 17defines = [ 18 "OHOS_PLATFORM", 19 "OHOS_STANDARD_SYSTEM", 20] 21 22js_engines = [] 23ark_engine = { 24 engine_name = "ark" 25 engine_path = "jsi" 26 engine_defines = [ "USE_ARK_ENGINE" ] 27} 28js_engines += [ ark_engine ] 29 30if (ace_enable_gpu) { 31 disable_gpu = false 32} else { 33 disable_gpu = true 34} 35 36declare_args() { 37 ace_engine_feature_enable_accessibility = false 38 ace_engine_feature_enable_web = false 39} 40 41if (ace_engine_feature_enable_accessibility) { 42 accessibility_support = true 43} 44 45if (ace_engine_feature_enable_web) { 46 web_components_support = true 47} 48 49use_build_in_js_engine = true 50use_external_icu = "shared" 51use_curl_download = true 52ohos_standard_fontmgr = true 53sk_use_hilog = true 54rich_components_support = true 55advance_components_support = false 56form_components_support = true 57remote_window_support = true 58plugin_components_support = true 59xcomponent_components_support = true 60pixel_map_support = true 61js_pa_support = true 62connect_server_support = true 63hdc_register_support = true 64pa_engine_path = "adapter/ohos/entrance/pa_engine" 65enable_rosen_backend = true 66enable_standard_input = true 67build_container_scope_lib = true 68multiple_window_support = true 69enable_ability_component = true 70video_components_support = true 71image_components_support = true 72preview_support = false 73enable_system_clipboard = true 74enable_image_compression = true 75 76if (defined(preview_support) && preview_support) { 77 defines += [ "PREVIEW" ] 78} 79 80if (defined(image_components_support) && image_components_support) { 81 defines += [ "IMAGE_SUPPORTED" ] 82} 83 84if (defined(video_components_support) && video_components_support) { 85 defines += [ "VIDEO_SUPPORTED" ] 86} 87 88if (defined(is_experiment_build) && is_experiment_build) { 89 web_components_support = true 90 accessibility_support = true 91} 92 93if (defined(web_components_support) && web_components_support) { 94 defines += [ "WEB_SUPPORTED" ] 95} 96 97if (defined(enable_ability_component) && enable_ability_component) { 98 defines += [ "ABILITY_COMPONENT_SUPPORTED" ] 99} 100 101if (disable_gpu || enable_rosen_backend) { 102 defines += [ "GPU_DISABLED" ] 103} 104 105if (disable_gpu) { 106 defines += [ "UPLOAD_GPU_DISABLED" ] 107} 108 109if (form_components_support) { 110 defines += [ "FORM_SUPPORTED" ] 111} 112 113if (form_components_support) { 114 defines += [ "REMOTE_WINDOW_SUPPORTED" ] 115} 116 117if (xcomponent_components_support) { 118 defines += [ "XCOMPONENT_SUPPORTED" ] 119} 120 121if (plugin_components_support) { 122 defines += [ "PLUGIN_COMPONENT_SUPPORTED" ] 123} 124 125if (pixel_map_support) { 126 defines += [ "PIXEL_MAP_SUPPORTED" ] 127} 128 129if (enable_rosen_backend) { 130 defines += [ "ENABLE_ROSEN_BACKEND" ] 131} 132 133if (enable_standard_input) { 134 defines += [ "ENABLE_STANDARD_INPUT" ] 135} 136 137if (multiple_window_support) { 138 defines += [ "MULTIPLE_WINDOW_SUPPORTED" ] 139} 140 141if (use_build_in_js_engine) { 142 defines += [ "HIDDEN_SYMBOL" ] 143} 144 145cflags_cc = [ 146 "-Wno-thread-safety-attributes", 147 "-Wno-thread-safety-analysis", 148] 149 150platform_deps = [ 151 "//foundation/arkui/ace_engine/adapter/ohos/entrance:ace_ohos_standard_entrance", 152 "//foundation/arkui/ace_engine/adapter/ohos/osal:ace_osal_ohos", 153] 154 155libace_target = "//foundation/arkui/ace_engine/build:libace" 156