# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos/ace/ace_args.gni") import("//foundation/graphic/graphic_2d/graphic_config.gni") defines = [ "OHOS_PLATFORM", "OHOS_STANDARD_SYSTEM", ] js_engines = [] ark_engine = { engine_name = "ark" engine_path = "jsi" engine_defines = [ "USE_ARK_ENGINE" ] } js_engines += [ ark_engine ] if (ace_enable_gpu) { disable_gpu = false } else { disable_gpu = true } declare_args() { ace_engine_feature_enable_accessibility = false ace_engine_feature_enable_web = false } if (ace_engine_feature_enable_accessibility) { accessibility_support = true } if (ace_engine_feature_enable_web) { web_components_support = true } use_build_in_js_engine = true use_external_icu = "shared" use_curl_download = true ohos_standard_fontmgr = true sk_use_hilog = true rich_components_support = true advance_components_support = false form_components_support = true remote_window_support = true effect_component_support = true plugin_components_support = true xcomponent_components_support = true pixel_map_support = true js_pa_support = true connect_server_support = true hdc_register_support = true pa_engine_path = "adapter/ohos/entrance/pa_engine" enable_rosen_backend = true if (defined(global_parts_info.distributeddatamgr_udmf)) { enable_drag_framework = true } else { enable_drag_framework = false } if (defined(global_parts_info.inputmethod_imf)) { enable_standard_input = true } else { enable_standard_input = false } build_container_scope_lib = true multiple_window_support = true enable_ability_component = true video_components_support = true video_support_jsstack = true image_components_support = true preview_support = false if (defined(global_parts_info.distributeddatamgr_pasteboard)) { enable_system_clipboard = true } else { enable_system_clipboard = false } enable_image_compression = true model_component_support = false window_scene_support = true if (defined(preview_support) && preview_support) { defines += [ "PREVIEW" ] } if (defined(image_components_support) && image_components_support) { defines += [ "IMAGE_SUPPORTED" ] } if (defined(video_components_support) && video_components_support) { defines += [ "VIDEO_SUPPORTED" ] } if (defined(video_support_jsstack) && video_support_jsstack) { defines += [ "SUPPORT_JSSTACK" ] } if (defined(is_experiment_build) && is_experiment_build) { web_components_support = true accessibility_support = true } if (defined(web_components_support) && web_components_support) { defines += [ "WEB_SUPPORTED" ] } if (defined(enable_ability_component) && enable_ability_component) { defines += [ "ABILITY_COMPONENT_SUPPORTED" ] } if (disable_gpu || enable_rosen_backend) { defines += [ "GPU_DISABLED" ] } if (disable_gpu) { defines += [ "UPLOAD_GPU_DISABLED" ] } if (form_components_support) { defines += [ "FORM_SUPPORTED" ] } if (remote_window_support) { defines += [ "REMOTE_WINDOW_SUPPORTED" ] } if (effect_component_support) { defines += [ "EFFECT_COMPONENT_SUPPORTED" ] } if (xcomponent_components_support) { defines += [ "XCOMPONENT_SUPPORTED" ] } if (plugin_components_support) { defines += [ "PLUGIN_COMPONENT_SUPPORTED" ] } if (pixel_map_support) { defines += [ "PIXEL_MAP_SUPPORTED" ] } if (enable_rosen_backend) { defines += [ "ENABLE_ROSEN_BACKEND" ] } if (enable_standard_input) { defines += [ "ENABLE_STANDARD_INPUT" ] } if (multiple_window_support) { defines += [ "MULTIPLE_WINDOW_SUPPORTED" ] } if (model_component_support) { defines += [ "MODEL_COMPONENT_SUPPORTED" ] } if (use_build_in_js_engine) { defines += [ "HIDDEN_SYMBOL" ] } if (window_scene_support) { defines += [ "WINDOW_SCENE_SUPPORTED" ] } if (enable_drag_framework) { defines += [ "ENABLE_DRAG_FRAMEWORK" ] } cflags_cc = [ "-Wno-thread-safety-attributes", "-Wno-thread-safety-analysis", ] platform_deps = [ "//foundation/arkui/ace_engine/adapter/ohos/entrance:ace_ohos_standard_entrance", "//foundation/arkui/ace_engine/adapter/ohos/osal:ace_osal_ohos", ] libace_target = "//foundation/arkui/ace_engine/build:libace"