1# Copyright (c) 2021-2024 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/ace_config.gni") 16import("//foundation/arkui/ace_engine/build/ace_ext.gni") 17 18config("container_scope_config") { 19 visibility = [ ":*" ] 20 include_dirs = [ 21 "$ace_root/frameworks", 22 "$ace_root/interfaces/inner_api/ace_kit/include", 23 ] 24} 25 26ohos_shared_library("ace_container_scope") { 27 public_configs = [ ":container_scope_config" ] 28 29 configs = [ "$ace_root:ace_config" ] 30 31 sources = [ "$ace_root/frameworks/core/common/container_scope.cpp" ] 32 33 subsystem_name = ace_engine_subsystem 34 innerapi_tags = [ "platformsdk_indirect" ] 35 part_name = ace_engine_part 36} 37 38ohos_static_library("ace_container_scope_static") { 39 public_configs = [ ":container_scope_config" ] 40 41 configs = [ "$ace_root:ace_config" ] 42 43 sources = [ "$ace_root/frameworks/core/common/container_scope.cpp" ] 44} 45 46# build core sources 47template("ace_core_source_set") { 48 forward_variables_from(invoker, "*") 49 50 ohos_source_set(target_name) { 51 if (current_os == "ohos") { 52 sanitize = { 53 integer_overflow = true 54 boundary_sanitize = true 55 debug = ace_sanitize_debug 56 } 57 } 58 subsystem_name = ace_engine_subsystem 59 part_name = ace_engine_part 60 defines += invoker.defines 61 platform = invoker.platform 62 include_dirs = [ "$ace_root" ] 63 64 if (ace_engine_feature_enable_split_mode && 65 defined(vendor_configs.ace_engine_advanced_split_mode_dirs)) { 66 include_dirs += vendor_configs.ace_engine_advanced_split_mode_dirs 67 } 68 69 if (ace_engine_feature_enable_nav_split_mode && 70 defined( 71 vendor_configs.ace_engine_advanced_navigation_split_mode_dirs)) { 72 include_dirs += 73 vendor_configs.ace_engine_advanced_navigation_split_mode_dirs 74 } 75 76 if (ace_engine_enable_circle_feature && 77 defined( 78 vendor_configs.ace_engine_advanced_navigation_circle_mode_dirs)) { 79 include_dirs += 80 vendor_configs.ace_engine_advanced_navigation_circle_mode_dirs 81 } 82 83 if (ace_engine_enable_circle_feature && 84 defined(vendor_configs.ace_engine_advanced_router_circle_mode_dirs)) { 85 include_dirs += vendor_configs.ace_engine_advanced_router_circle_mode_dirs 86 } 87 88 # add common source file needed by all product platform here 89 sources = [ 90 # accessibility 91 "accessibility/accessibility_manager_ng.cpp", 92 "accessibility/accessibility_node.cpp", 93 "accessibility/accessibility_session_adapter.cpp", 94 "accessibility/accessibility_utils.cpp", 95 "accessibility/native_interface_accessibility_impl.cpp", 96 "accessibility/native_interface_accessibility_provider.cpp", 97 98 # animation 99 "animation/animatable_data.cpp", 100 "animation/animatable_properties.cpp", 101 "animation/animation_pub.cpp", 102 "animation/animation_util.cpp", 103 "animation/animator.cpp", 104 "animation/animator_group.cpp", 105 "animation/anticipate_curve.cpp", 106 "animation/bilateral_spring_adapter.cpp", 107 "animation/bilateral_spring_node.cpp", 108 "animation/card_transition_controller.cpp", 109 "animation/chain_animation.cpp", 110 "animation/cubic_curve.cpp", 111 "animation/curves.cpp", 112 "animation/friction_motion.cpp", 113 "animation/property_animation.cpp", 114 "animation/scheduler.cpp", 115 "animation/scroll_motion.cpp", 116 "animation/shared_transition_controller.cpp", 117 "animation/shared_transition_effect.cpp", 118 "animation/simple_spring_adapter.cpp", 119 "animation/simple_spring_chain.cpp", 120 "animation/simple_spring_node.cpp", 121 "animation/spring_animation.cpp", 122 "animation/spring_curve.cpp", 123 "animation/spring_model.cpp", 124 "animation/spring_motion.cpp", 125 "animation/svg_animate.cpp", 126 127 # common 128 "common/ace_application_info.cpp", 129 "common/ace_engine.cpp", 130 "common/ace_engine_ext.cpp", 131 "common/agingadapation/aging_adapation_dialog_util.cpp", 132 "common/anr_thread.cpp", 133 "common/asset_manager_impl.cpp", 134 "common/card_scope.cpp", 135 "common/clipboard/clipboard_proxy.cpp", 136 "common/container.cpp", 137 "common/container_scope.cpp", 138 "common/environment/environment_proxy.cpp", 139 "common/event_dump.cpp", 140 "common/event_manager.cpp", 141 "common/event_manager_pen.cpp", 142 "common/focus_animation_manager.cpp", 143 "common/font_loader.cpp", 144 "common/font_manager.cpp", 145 "common/frontend.cpp", 146 "common/key_event_manager.cpp", 147 "common/platform_bridge.cpp", 148 "common/render_boundary_manager.cpp", 149 "common/resource/resource_manager.cpp", 150 "common/resource/resource_wrapper.cpp", 151 "common/sharedata/share_data.cpp", 152 "common/storage/storage_proxy.cpp", 153 "common/task_executor_impl.cpp", 154 "common/task_runner_adapter_factory.cpp", 155 "common/task_runner_adapter_impl.cpp", 156 "common/task_runners.cpp", 157 "common/text_field_manager.cpp", 158 "common/thread_checker.cpp", 159 "common/thread_container.cpp", 160 "common/thread_model_impl.cpp", 161 "common/vibrator/vibrator_proxy.cpp", 162 "common/watch_dog.cpp", 163 "common/window.cpp", 164 165 # declaration 166 "components/declaration/badge/badge_declaration.cpp", 167 "components/declaration/button/button_declaration.cpp", 168 "components/declaration/canvas/canvas_declaration.cpp", 169 "components/declaration/clock/clock_declaration.cpp", 170 "components/declaration/common/declaration.cpp", 171 "components/declaration/common/declaration_constants.cpp", 172 "components/declaration/common/declaration_creator_manager.cpp", 173 "components/declaration/common/event.cpp", 174 "components/declaration/div/div_declaration.cpp", 175 "components/declaration/image/image_animator_declaration.cpp", 176 "components/declaration/input/input_declaration.cpp", 177 "components/declaration/piece/piece_declaration.cpp", 178 "components/declaration/qrcode/qrcode_declaration.cpp", 179 "components/declaration/richtext/rich_text_declaration.cpp", 180 "components/declaration/search/search_declaration.cpp", 181 "components/declaration/side_bar/side_bar_declaration.cpp", 182 "components/declaration/span/span_declaration.cpp", 183 "components/declaration/svg/svg_animate_declaration.cpp", 184 "components/declaration/svg/svg_base_declaration.cpp", 185 "components/declaration/svg/svg_circle_declaration.cpp", 186 "components/declaration/svg/svg_declaration.cpp", 187 "components/declaration/svg/svg_ellipse_declaration.cpp", 188 "components/declaration/svg/svg_fe_blend_declaration.cpp", 189 "components/declaration/svg/svg_fe_colormatrix_declaration.cpp", 190 "components/declaration/svg/svg_fe_component_transfer_declaration.cpp", 191 "components/declaration/svg/svg_fe_composite_declaration.cpp", 192 "components/declaration/svg/svg_fe_declaration.cpp", 193 "components/declaration/svg/svg_fe_flood_declaration.cpp", 194 "components/declaration/svg/svg_fe_func_declaration.cpp", 195 "components/declaration/svg/svg_fe_gaussianblur_declaration.cpp", 196 "components/declaration/svg/svg_fe_merge_declaration.cpp", 197 "components/declaration/svg/svg_fe_merge_node_declaration.cpp", 198 "components/declaration/svg/svg_fe_offset_declaration.cpp", 199 "components/declaration/svg/svg_filter_declaration.cpp", 200 "components/declaration/svg/svg_gradient_declaration.cpp", 201 "components/declaration/svg/svg_image_declaration.cpp", 202 "components/declaration/svg/svg_line_declaration.cpp", 203 "components/declaration/svg/svg_mask_declaration.cpp", 204 "components/declaration/svg/svg_path_declaration.cpp", 205 "components/declaration/svg/svg_pattern_declaration.cpp", 206 "components/declaration/svg/svg_polygon_declaration.cpp", 207 "components/declaration/svg/svg_rect_declaration.cpp", 208 "components/declaration/svg/svg_stop_declaration.cpp", 209 "components/declaration/svg/svg_text_declaration.cpp", 210 "components/declaration/svg/svg_text_path_declaration.cpp", 211 "components/declaration/swiper/swiper_declaration.cpp", 212 "components/declaration/text/text_declaration.cpp", 213 "components/declaration/textarea/textarea_declaration.cpp", 214 "components/declaration/textfield/textfield_declaration.cpp", 215 "components/declaration/texttimer/texttimer_declaration.cpp", 216 "components/declaration/web/web_declaration.cpp", 217 "components/declaration/xcomponent/xcomponent_declaration.cpp", 218 219 # gestures 220 "gestures/click_recognizer.cpp", 221 "gestures/drag_event.cpp", 222 "gestures/drag_recognizer.cpp", 223 "gestures/exclusive_recognizer.cpp", 224 "gestures/gesture_recognizer.cpp", 225 "gestures/gesture_referee.cpp", 226 "gestures/long_press_recognizer.cpp", 227 "gestures/multi_fingers_recognizer.cpp", 228 "gestures/pan_recognizer.cpp", 229 "gestures/parallel_recognizer.cpp", 230 "gestures/pinch_recognizer.cpp", 231 "gestures/press_recognizer.cpp", 232 "gestures/raw_recognizer.cpp", 233 "gestures/rotation_recognizer.cpp", 234 "gestures/sequenced_recognizer.cpp", 235 "gestures/single_child_gesture.cpp", 236 "gestures/slide_recognizer.cpp", 237 "gestures/swipe_recognizer.cpp", 238 "gestures/timeout_recognizer.cpp", 239 "gestures/velocity_tracker.cpp", 240 241 # declarative 242 "gestures/gesture_group.cpp", 243 "gestures/long_press_gesture.cpp", 244 "gestures/pan_gesture.cpp", 245 "gestures/pinch_gesture.cpp", 246 "gestures/rotation_gesture.cpp", 247 "gestures/slide_gesture.cpp", 248 "gestures/tap_gesture.cpp", 249 "gestures/timeout_gesture.cpp", 250 251 # event 252 "event/axis_event.cpp", 253 "event/back_end_event_manager.cpp", 254 "event/key_event.cpp", 255 "event/key_event_recognizer.cpp", 256 "event/mouse_event.cpp", 257 "event/mouse_raw_recognizer.cpp", 258 "event/resample_algo.cpp", 259 "event/touch_event.cpp", 260 261 # focus 262 "focus/focus_node.cpp", 263 264 # image 265 "image/animated_image_player.cpp", 266 "image/image_cache.cpp", 267 "image/image_compressor.cpp", 268 "image/image_file_cache.cpp", 269 "image/image_loader.cpp", 270 "image/image_object.cpp", 271 "image/image_object_animated.cpp", 272 "image/image_object_svg.cpp", 273 "image/image_provider.cpp", 274 "image/image_source_info.cpp", 275 276 # textfield 277 "common/ime/text_editing_value.cpp", 278 "common/ime/text_input_action.cpp", 279 "common/ime/text_input_client.cpp", 280 "common/ime/text_input_configuration.cpp", 281 "common/ime/text_input_connection.cpp", 282 "common/ime/text_input_formatter.cpp", 283 "common/ime/text_input_proxy.cpp", 284 "common/ime/text_input_type.cpp", 285 286 # recorder 287 "common/recorder/event_config.cpp", 288 "common/recorder/event_controller.cpp", 289 "common/recorder/event_recorder.cpp", 290 "common/recorder/exposure_processor.cpp", 291 "common/recorder/inspector_tree_collector.cpp", 292 "common/recorder/node_data_cache.cpp", 293 294 # text 295 "text/text_emoji_processor.cpp", 296 ] 297 298 if (platform == "ohos" || platform == "ohos_ng") { 299 sources -= [ "common/anr_thread.cpp" ] 300 } 301 302 # add sources needed by phone and TV. wearable like watch do not need them 303 if (!is_wearable_product) { 304 sources += [ 305 "event/multimodal/multimodal_manager.cpp", 306 "event/multimodal/multimodal_scene.cpp", 307 ] 308 } 309 310 # add sources needed by phone, tv and wearable. previews do not need them 311 if (defined(config.connect_server_support) && 312 config.connect_server_support) { 313 if (use_ios) { 314 include_dirs += [ "$ark_toolchain_path" ] 315 } 316 sources += [ "common/connect_server_manager.cpp" ] 317 } 318 319 if (defined(config.hdc_register_support) && config.hdc_register_support) { 320 sources += [ "common/hdc_register.cpp" ] 321 } 322 323 if (ohos_indep_compiler_enable) { 324 include_dirs += indep_compile_includes 325 } 326 327 configs = [ "$ace_root:ace_config" ] 328 329 deps = [ 330 "pipeline:ace_core_pipeline_$platform", 331 "pipeline_ng:ace_core_pipeline_ng_$platform", 332 ] 333 334 external_deps = [] 335 if (ace_engine_feature_enable_event_extra_handling && 336 defined( 337 vendor_configs.ace_engine_advanced_enable_event_extra_handling)) { 338 sources += vendor_configs.ace_engine_advanced_enable_event_extra_handling 339 sources += 340 vendor_configs.ace_engine_advanced_enable_event_compatible_handling 341 external_deps += vendor_configs.ace_engine_advanced_enable_event_compatible_handling_deps 342 } else { 343 sources += [ "event/event_info_convertor.cpp" ] 344 } 345 346 if (use_hilog) { 347 external_deps += [ "hilog:libhilog" ] 348 } 349 if (defined(config.build_for_preview) && config.build_for_preview) { 350 sources -= [ "common/task_runner_adapter_impl.cpp" ] 351 } 352 353 deps += [ 354 "$ace_root/frameworks/core/components/ability_component:ace_core_components_ability_$platform", 355 "$ace_root/frameworks/core/components/align:ace_core_components_align_$platform", 356 "$ace_root/frameworks/core/components/arc:ace_core_components_arc_$platform", 357 "$ace_root/frameworks/core/components/badge:ace_core_components_badge_$platform", 358 "$ace_root/frameworks/core/components/box:ace_core_components_box_$platform", 359 "$ace_root/frameworks/core/components/bubble:ace_core_components_bubble_$platform", 360 "$ace_root/frameworks/core/components/button:ace_core_components_button_$platform", 361 "$ace_root/frameworks/core/components/calendar:ace_core_components_calendar_$platform", 362 "$ace_root/frameworks/core/components/chart:ace_core_components_chart_$platform", 363 "$ace_root/frameworks/core/components/checkable:ace_core_components_checkable_$platform", 364 "$ace_root/frameworks/core/components/clip:ace_core_components_clip_$platform", 365 "$ace_root/frameworks/core/components/clock:ace_core_components_clock_$platform", 366 "$ace_root/frameworks/core/components/common:ace_core_components_common_$platform", 367 "$ace_root/frameworks/core/components/container_modal:ace_core_components_container_modal_$platform", 368 "$ace_root/frameworks/core/components/counter:ace_core_components_counter_$platform", 369 "$ace_root/frameworks/core/components/coverage:ace_core_components_coverage_$platform", 370 "$ace_root/frameworks/core/components/custom_dialog:ace_core_components_custom_dialog_$platform", 371 "$ace_root/frameworks/core/components/custom_paint:ace_core_components_custom_paint_$platform", 372 "$ace_root/frameworks/core/components/data_panel:ace_core_components_data_panel_$platform", 373 "$ace_root/frameworks/core/components/dialog:ace_core_components_dialog_$platform", 374 "$ace_root/frameworks/core/components/dialog_modal:ace_core_components_dialog_modal_$platform", 375 "$ace_root/frameworks/core/components/dialog_tween:ace_core_components_dialog_tween_$platform", 376 "$ace_root/frameworks/core/components/display:ace_core_components_display_$platform", 377 "$ace_root/frameworks/core/components/divider:ace_core_components_divider_$platform", 378 "$ace_root/frameworks/core/components/drag_bar:ace_core_components_drag_bar_$platform", 379 "$ace_root/frameworks/core/components/drop_filter:ace_core_components_drop_filter_$platform", 380 "$ace_root/frameworks/core/components/flex:ace_core_components_flex_$platform", 381 "$ace_root/frameworks/core/components/focus_animation:ace_core_components_focus_animation_$platform", 382 "$ace_root/frameworks/core/components/focus_collaboration:ace_core_components_focus_collaboration_$platform", 383 "$ace_root/frameworks/core/components/focusable:ace_core_components_focusable_$platform", 384 "$ace_root/frameworks/core/components/font:ace_core_components_font_$platform", 385 "$ace_root/frameworks/core/components/foreach:ace_core_components_foreach_$platform", 386 "$ace_root/frameworks/core/components/gesture_listener:ace_core_components_gesture_listener_$platform", 387 "$ace_root/frameworks/core/components/grid:ace_core_components_grid_$platform", 388 "$ace_root/frameworks/core/components/grid_layout:ace_core_components_grid_layout_$platform", 389 "$ace_root/frameworks/core/components/hyperlink:ace_core_components_hyperlink_$platform", 390 "$ace_root/frameworks/core/components/ifelse:ace_core_components_ifelse_$platform", 391 "$ace_root/frameworks/core/components/image:ace_core_components_image_$platform", 392 "$ace_root/frameworks/core/components/indexer:ace_core_components_indexer_$platform", 393 "$ace_root/frameworks/core/components/list:ace_core_components_list_$platform", 394 "$ace_root/frameworks/core/components/marquee:ace_core_components_marquee_$platform", 395 "$ace_root/frameworks/core/components/menu:ace_core_components_menu_$platform", 396 "$ace_root/frameworks/core/components/mouse_listener:ace_core_components_mouse_listener_$platform", 397 "$ace_root/frameworks/core/components/navigation_bar:ace_core_components_navigation_bar_$platform", 398 "$ace_root/frameworks/core/components/navigator:ace_core_components_navigator_$platform", 399 "$ace_root/frameworks/core/components/option:ace_core_components_option_$platform", 400 "$ace_root/frameworks/core/components/overlay:ace_core_components_overlay_$platform", 401 "$ace_root/frameworks/core/components/padding:ace_core_components_padding_$platform", 402 "$ace_root/frameworks/core/components/page:ace_core_components_page_$platform", 403 "$ace_root/frameworks/core/components/page_transition:ace_core_components_page_transition_$platform", 404 "$ace_root/frameworks/core/components/panel:ace_core_components_panel_$platform", 405 "$ace_root/frameworks/core/components/picker:ace_core_components_picker_$platform", 406 "$ace_root/frameworks/core/components/positioned:ace_core_components_positioned_$platform", 407 "$ace_root/frameworks/core/components/progress:ace_core_components_progress_$platform", 408 "$ace_root/frameworks/core/components/proxy:ace_core_components_proxy_$platform", 409 "$ace_root/frameworks/core/components/refresh:ace_core_components_refresh_$platform", 410 "$ace_root/frameworks/core/components/relative_container:ace_core_components_relative_container_$platform", 411 "$ace_root/frameworks/core/components/root:ace_core_components_root_$platform", 412 "$ace_root/frameworks/core/components/scoring:ace_core_components_scoring_$platform", 413 "$ace_root/frameworks/core/components/scroll:ace_core_components_scroll_$platform", 414 "$ace_root/frameworks/core/components/scroll_bar:ace_core_components_scroll_bar_$platform", 415 "$ace_root/frameworks/core/components/search:ace_core_components_search_$platform", 416 "$ace_root/frameworks/core/components/select_popup:ace_core_components_select_popup_$platform", 417 "$ace_root/frameworks/core/components/semi_modal:ace_core_components_semi_modal_$platform", 418 "$ace_root/frameworks/core/components/shadow:ace_core_components_shadow_$platform", 419 "$ace_root/frameworks/core/components/shape:ace_core_components_shape_$platform", 420 "$ace_root/frameworks/core/components/shared_transition:ace_core_components_shared_transition_$platform", 421 "$ace_root/frameworks/core/components/sheet:ace_core_components_sheet_$platform", 422 "$ace_root/frameworks/core/components/side_bar:ace_core_components_side_bar_$platform", 423 "$ace_root/frameworks/core/components/slider:ace_core_components_slider_$platform", 424 "$ace_root/frameworks/core/components/split_container:ace_core_components_split_container_$platform", 425 "$ace_root/frameworks/core/components/stack:ace_core_components_stack_$platform", 426 "$ace_root/frameworks/core/components/stage:ace_core_components_stage_$platform", 427 "$ace_root/frameworks/core/components/stepper:ace_core_components_stepper_$platform", 428 "$ace_root/frameworks/core/components/svg:ace_core_components_svg_$platform", 429 "$ace_root/frameworks/core/components/swiper:ace_core_components_swiper_$platform", 430 "$ace_root/frameworks/core/components/tab_bar:ace_core_components_tab_bar_$platform", 431 "$ace_root/frameworks/core/components/text:ace_core_components_text_$platform", 432 "$ace_root/frameworks/core/components/text_clock:ace_core_components_text_clock_$platform", 433 "$ace_root/frameworks/core/components/text_field:ace_core_components_text_field_$platform", 434 "$ace_root/frameworks/core/components/text_span:ace_core_components_text_span_$platform", 435 "$ace_root/frameworks/core/components/texttimer:ace_core_components_texttimer_$platform", 436 "$ace_root/frameworks/core/components/texttimer:ace_core_components_texttimer_$platform", 437 "$ace_root/frameworks/core/components/theme:ace_core_components_theme_$platform", 438 "$ace_root/frameworks/core/components/tip:ace_core_components_tip_$platform", 439 "$ace_root/frameworks/core/components/toast:ace_core_components_toast_$platform", 440 "$ace_root/frameworks/core/components/toggle:ace_core_components_toggle_$platform", 441 "$ace_root/frameworks/core/components/touch_listener:ace_core_components_touch_listener_$platform", 442 "$ace_root/frameworks/core/components/track:ace_core_components_track_$platform", 443 "$ace_root/frameworks/core/components/transform:ace_core_components_transform_$platform", 444 "$ace_root/frameworks/core/components/transition:ace_core_components_transition_$platform", 445 "$ace_root/frameworks/core/components/triangle:ace_core_components_triangle_$platform", 446 "$ace_root/frameworks/core/components/tween:ace_core_components_tween_$platform", 447 "$ace_root/frameworks/core/components/watch_slider:ace_core_components_watch_slider_$platform", 448 "$ace_root/frameworks/core/components/wrap:ace_core_components_wrap_$platform", 449 ] 450 451 deps += [ 452 "$ace_root/frameworks/core/components_v2/common:ace_core_components_common_v2_$platform", 453 "$ace_root/frameworks/core/components_v2/foreach:ace_core_components_foreach_v2_$platform", 454 "$ace_root/frameworks/core/components_v2/grid:ace_core_components_grid_v2_$platform", 455 "$ace_root/frameworks/core/components_v2/grid_layout:ace_core_components_grid_layout_v2_$platform", 456 "$ace_root/frameworks/core/components_v2/indexer:ace_core_components_indexer_v2_$platform", 457 "$ace_root/frameworks/core/components_v2/inspector:ace_core_components_inspector_v2_$platform", 458 "$ace_root/frameworks/core/components_v2/list:ace_core_components_list_v2_$platform", 459 "$ace_root/frameworks/core/components_v2/pattern_lock:ace_core_components_pattern_lock_$platform", 460 "$ace_root/frameworks/core/components_v2/swiper:ace_core_components_swiper_v2_$platform", 461 "$ace_root/frameworks/core/components_v2/tabs:ace_core_components_tabs_v2_$platform", 462 "$ace_root/frameworks/core/components_v2/water_flow:ace_core_components_water_flow_v2_$platform", 463 ] 464 465 deps += [ "$ace_root/frameworks/core/components_part_upd/foreach:ace_core_components_foreach_part_upd_$platform" ] 466 467 deps += [ 468 "$ace_root/frameworks/core/components_ng/animation:ace_core_components_animation_ng_$platform", 469 "$ace_root/frameworks/core/components_ng/base:ace_core_components_base_ng_$platform", 470 "$ace_root/frameworks/core/components_ng/event:ace_core_components_event_ng_$platform", 471 "$ace_root/frameworks/core/components_ng/gestures:ace_core_components_gestures_ng_$platform", 472 "$ace_root/frameworks/core/components_ng/image_provider:ace_core_components_image_provider_ng_$platform", 473 "$ace_root/frameworks/core/components_ng/layout:ace_core_components_layout_ng_$platform", 474 "$ace_root/frameworks/core/components_ng/manager:ace_core_components_manager_ng_$platform", 475 "$ace_root/frameworks/core/components_ng/pattern:ace_core_components_pattern_ng_$platform", 476 "$ace_root/frameworks/core/components_ng/property:ace_core_components_property_ng_$platform", 477 "$ace_root/frameworks/core/components_ng/render:ace_core_components_render_ng_$platform", 478 "$ace_root/frameworks/core/components_ng/svg:ace_core_components_svg_ng_$platform", 479 "$ace_root/frameworks/core/components_ng/syntax:ace_core_components_syntax_ng_$platform", 480 "$ace_root/frameworks/core/components_ng/token_theme:ace_core_components_token_theme_ng_$platform", 481 ] 482 483 deps += [ 484 "$ace_root/frameworks/core/components_ng/pattern/patternlock:ace_core_components_patternlock_pattern_ng_$platform", 485 "$ace_root/frameworks/core/components_ng/pattern/rich_editor:ace_core_components_rich_editor_pattern_ng_$platform", 486 "$ace_root/frameworks/core/components_ng/pattern/security_component:ace_core_components_security_component_pattern_ng_$platform", 487 "$ace_root/frameworks/core/components_ng/pattern/text_field:ace_core_components_text_field_pattern_ng_$platform", 488 ] 489 490 if (qrcodegen_support) { 491 deps += [ 492 "$ace_root/frameworks/core/components/qrcode:ace_core_components_qrcode_$platform", 493 "$ace_root/frameworks/core/components_ng/pattern/qrcode:ace_core_components_qrcode_pattern_ng_$platform", 494 ] 495 } 496 497 if (defined(config.model_component_support) && 498 config.model_component_support) { 499 deps += [ "$ace_root/frameworks/core/components_ng/pattern/model:ace_core_components_model_pattern_ng_$platform" ] 500 } 501 502 if (defined(config.enable_ability_component) && 503 config.enable_ability_component) { 504 deps += [ "$ace_root/frameworks/core/components_ng/pattern/ability_component:ace_core_components_ability_component_pattern_ng_$platform" ] 505 } 506 if (defined(config.enable_image_compression) && 507 config.enable_image_compression) { 508 external_deps += [ "opencl-headers:libcl" ] 509 defines += [ "ENABLE_OPENCL" ] 510 } 511 512 if (current_os == "mingw" || current_os == "mac") { 513 sources -= [ "common/watch_dog.cpp" ] 514 sources += [ "common/watch_dog_mingw.cpp" ] 515 } 516 517 if (defined(config.enable_rosen_backend) && config.enable_rosen_backend) { 518 sources += [ 519 "animation/native_curve_helper.cpp", 520 "common/rosen/rosen_convert_helper.cpp", 521 ] 522 if (is_ohos) { 523 defines += [ "TEXGINE_SUPPORT_FOR_OHOS" ] 524 } 525 if (is_arkui_x) { 526 deps += [ "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client_static" ] 527 include_dirs += [ 528 "//foundation/graphic/graphic_2d/utils/color_manager/export", 529 "//foundation/multimedia/image_framework/interfaces/innerkits/include", 530 ] 531 } else { 532 if (ace_use_rosen_drawing) { 533 external_deps += [ "graphic_2d:2d_graphics" ] 534 } 535 external_deps += [ "graphic_2d:librender_service_client" ] 536 } 537 } 538 539 if (!use_mingw_win && !use_mac && !is_wearable_product && 540 !is_ohos_standard_system && !use_linux) { 541 deps += [ "$ace_root/frameworks/core/components/rich_text:ace_core_components_rich_text_$platform" ] 542 } 543 544 if (defined(config.web_components_support) && 545 config.web_components_support && !is_arkui_x) { 546 deps += [ 547 "$ace_root/frameworks/core/components/text_overlay:ace_core_components_text_overlay_for_web_$platform", 548 "$ace_root/frameworks/core/components/web:ace_core_components_web_$platform", 549 "$ace_root/frameworks/core/components_ng/pattern/web:ace_core_components_web_pattern_ng_$platform", 550 ] 551 } else { 552 deps += [ "$ace_root/frameworks/core/components/text_overlay:ace_core_components_text_overlay_$platform" ] 553 } 554 555 # xcomponent components supports phone, TV and wearable except PC Preview 556 if (defined(config.xcomponent_components_support) && 557 config.xcomponent_components_support) { 558 deps += [ "$ace_root/frameworks/core/components/xcomponent:ace_core_components_xcomponent_$platform" ] 559 deps += [ "$ace_root/frameworks/core/components_ng/pattern/xcomponent:ace_core_components_xcomponent_pattern_ng_$platform" ] 560 } 561 562 if (defined(config.enable_ability_component) && 563 config.enable_ability_component) { 564 deps += [ "$ace_root/frameworks/core/components_v2/ability_component:ace_core_components_ability_v2_$platform" ] 565 } 566 567 if (defined(config.apng_image_support) && config.apng_image_support) { 568 defines += [ "APNG_IMAGE_SUPPORT" ] 569 deps += [ "$ace_root/frameworks/core/image/apng:ace_core_apng_$platform" ] 570 } 571 572 if (defined(config.form_components_support) && 573 config.form_components_support) { 574 if (!use_mingw_win && !use_mac && !use_linux) { 575 sources += [ "common/form_manager.cpp" ] 576 deps += [ 577 "$ace_root/frameworks/core/components/form:ace_core_components_form_$platform", 578 "$ace_root/frameworks/core/components_ng/pattern/form:ace_core_components_form_pattern_ng_$platform", 579 ] 580 external_deps += [ 581 "ability_base:base", 582 "ability_base:want", 583 "form_fwk:form_manager", 584 ] 585 } 586 } 587 588 if (defined(config.remote_window_support) && config.remote_window_support) { 589 if (!use_mingw_win && !use_mac && !use_linux) { 590 deps += [ 591 "$ace_root/frameworks/core/components/remote_window:ace_core_components_remote_window_$platform", 592 "$ace_root/frameworks/core/components_ng/pattern/remote_window:ace_core_components_remote_window_pattern_ng_$platform", 593 ] 594 } 595 } 596 597 if (defined(config.build_container_scope_lib) && 598 config.build_container_scope_lib) { 599 sources -= [ "common/container_scope.cpp" ] 600 if (is_arkui_x) { 601 deps += [ ":ace_container_scope_static" ] 602 } else { 603 deps += [ ":ace_container_scope" ] 604 } 605 } 606 607 if (defined(config.plugin_components_support) && 608 config.plugin_components_support) { 609 deps += [ 610 "$ace_root/frameworks/core/components/plugin:ace_core_components_plugin_$platform", 611 "$ace_root/frameworks/core/components_ng/pattern/plugin:ace_core_components_plugin_pattern_ng_$platform", 612 ] 613 sources += [ "common/plugin_manager.cpp" ] 614 external_deps += [ "c_utils:utils" ] 615 } 616 617 if (defined(config.preview_support) && config.preview_support) { 618 deps += [ "$ace_root/frameworks/core/components_ng/pattern/preview_mock:ace_core_components_preview_mock_pattern_ng_$platform" ] 619 } 620 621 if (is_arkui_x) { 622 include_dirs += [ 623 "//foundation/appframework/ability/ability_runtime/cross_platform/frameworks/native/base/event_handler/include", 624 "//foundation/appframework/ability/ability_runtime/cross_platform/interfaces/inner_api/error", 625 "//foundation/graphic/graphic_2d/utils/color_manager/export", 626 "//foundation/multimedia/image_framework/interfaces/innerkits/include", 627 ] 628 } 629 if (!is_wearable_product) { 630 deps += [ 631 "$ace_root/frameworks/core/components/multimodal:ace_core_components_multimodal_$platform", 632 "$ace_root/frameworks/core/components/piece:ace_core_components_piece_$platform", 633 "$ace_root/frameworks/core/components/popup:ace_core_components_popup_$platform", 634 "$ace_root/frameworks/core/components/rating:ace_core_components_rating_$platform", 635 "$ace_root/frameworks/core/components/select:ace_core_components_select_$platform", 636 "$ace_root/frameworks/core/components/tool_bar:ace_core_components_tool_bar_$platform", 637 ] 638 if (enable_player_framework) { 639 deps += [ "$ace_root/frameworks/core/components/video:ace_core_components_video_$platform" ] 640 if (enable_camera_framework) { 641 deps += [ "$ace_root/frameworks/core/components/camera:ace_core_components_camera_$platform" ] 642 } 643 } 644 } 645 646 if ((current_os == "mingw" || current_os == "mac" || 647 current_os == "linux") && defined(config.enable_rosen_backend) && 648 config.enable_rosen_backend) { 649 sources += [ 650 # rs impl 651 "common/rosen/rosen_asset_manager.cpp", 652 "common/rosen/rosen_window.cpp", 653 ] 654 include_dirs += 655 [ "//foundation/window/window_manager/interfaces/innerkits/wm" ] 656 external_deps += [ "libuv:uv" ] 657 } 658 659 if (defined(config.window_scene_support) && config.window_scene_support) { 660 deps += [ 661 "$ace_root/frameworks/core/components_ng/pattern/ui_extension:ace_core_components_ui_extension_pattern_ng_$platform", 662 "$ace_root/frameworks/core/components_ng/pattern/window_scene:ace_core_components_window_scene_$platform", 663 ] 664 } 665 666 if (defined(config.use_platform_font) && config.use_platform_font) { 667 defines += [ "USE_PLATFORM_FONT" ] 668 sources += [ "common/font/font_platform_proxy.cpp" ] 669 } 670 671 # arkoala C interface 672 deps += [ "$ace_root/frameworks/core/interfaces/native:ace_core_interfaces_native_node_$platform" ] 673 674 cflags_cc = [] 675 cflags_cc += invoker.cflags_cc 676 } 677} 678 679# build ng core sources 680template("ace_core_ng_source_set") { 681 forward_variables_from(invoker, "*") 682 683 ohos_source_set(target_name) { 684 if (current_os == "ohos") { 685 sanitize = { 686 integer_overflow = true 687 boundary_sanitize = true 688 debug = ace_sanitize_debug 689 } 690 } 691 subsystem_name = ace_engine_subsystem 692 part_name = ace_engine_part 693 defines += invoker.defines 694 platform = invoker.platform 695 696 # add common source file needed by all product platform here 697 sources = [ 698 # accessibility 699 "accessibility/accessibility_manager_ng.cpp", 700 "accessibility/accessibility_node.cpp", 701 "accessibility/accessibility_session_adapter.cpp", 702 "accessibility/accessibility_utils.cpp", 703 "accessibility/native_interface_accessibility_impl.cpp", 704 "accessibility/native_interface_accessibility_provider.cpp", 705 706 # animation 707 "animation/animatable_data.cpp", 708 "animation/animatable_properties.cpp", 709 "animation/animation_pub.cpp", 710 "animation/animation_util.cpp", 711 "animation/animator.cpp", 712 "animation/animator_group.cpp", 713 "animation/anticipate_curve.cpp", 714 "animation/bilateral_spring_adapter.cpp", 715 "animation/bilateral_spring_node.cpp", 716 "animation/chain_animation.cpp", 717 "animation/cubic_curve.cpp", 718 "animation/curves.cpp", 719 "animation/friction_motion.cpp", 720 "animation/property_animation.cpp", 721 "animation/scheduler.cpp", 722 "animation/scroll_motion.cpp", 723 "animation/simple_spring_adapter.cpp", 724 "animation/simple_spring_chain.cpp", 725 "animation/simple_spring_node.cpp", 726 "animation/spring_animation.cpp", 727 "animation/spring_curve.cpp", 728 "animation/spring_model.cpp", 729 "animation/spring_motion.cpp", 730 "animation/svg_animate.cpp", 731 732 # common 733 "common/ace_application_info.cpp", 734 "common/ace_engine.cpp", 735 "common/ace_engine_ext.cpp", 736 "common/agingadapation/aging_adapation_dialog_util.cpp", 737 "common/anr_thread.cpp", 738 "common/asset_manager_impl.cpp", 739 "common/card_scope.cpp", 740 "common/clipboard/clipboard_proxy.cpp", 741 "common/container.cpp", 742 "common/container_scope.cpp", 743 "common/environment/environment_proxy.cpp", 744 "common/event_dump.cpp", 745 "common/event_manager.cpp", 746 "common/event_manager_pen.cpp", 747 "common/focus_animation_manager.cpp", 748 "common/font_loader.cpp", 749 "common/font_manager.cpp", 750 "common/frontend.cpp", 751 "common/key_event_manager.cpp", 752 "common/platform_bridge.cpp", 753 "common/render_boundary_manager.cpp", 754 "common/resource/resource_manager.cpp", 755 "common/resource/resource_wrapper.cpp", 756 "common/sharedata/share_data.cpp", 757 "common/storage/storage_proxy.cpp", 758 "common/task_executor_impl.cpp", 759 "common/task_runner_adapter_factory.cpp", 760 "common/task_runner_adapter_impl.cpp", 761 "common/task_runners.cpp", 762 "common/text_field_manager.cpp", 763 "common/thread_checker.cpp", 764 "common/thread_container.cpp", 765 "common/thread_model_impl.cpp", 766 "common/vibrator/vibrator_proxy.cpp", 767 "common/watch_dog.cpp", 768 "common/window.cpp", 769 770 # event 771 "event/axis_event.cpp", 772 "event/back_end_event_manager.cpp", 773 "event/key_event.cpp", 774 "event/key_event_recognizer.cpp", 775 "event/mouse_event.cpp", 776 "event/mouse_raw_recognizer.cpp", 777 "event/resample_algo.cpp", 778 "event/touch_event.cpp", 779 780 # gestures 781 "gestures/click_recognizer.cpp", 782 "gestures/drag_event.cpp", 783 "gestures/drag_recognizer.cpp", 784 "gestures/exclusive_recognizer.cpp", 785 "gestures/gesture_recognizer.cpp", 786 "gestures/gesture_referee.cpp", 787 "gestures/long_press_recognizer.cpp", 788 "gestures/multi_fingers_recognizer.cpp", 789 "gestures/pan_recognizer.cpp", 790 "gestures/parallel_recognizer.cpp", 791 "gestures/pinch_recognizer.cpp", 792 "gestures/press_recognizer.cpp", 793 "gestures/raw_recognizer.cpp", 794 "gestures/rotation_recognizer.cpp", 795 "gestures/sequenced_recognizer.cpp", 796 "gestures/single_child_gesture.cpp", 797 "gestures/slide_recognizer.cpp", 798 "gestures/swipe_recognizer.cpp", 799 "gestures/timeout_recognizer.cpp", 800 "gestures/velocity_tracker.cpp", 801 802 # declarative gestures 803 "gestures/gesture_group.cpp", 804 "gestures/long_press_gesture.cpp", 805 "gestures/pan_gesture.cpp", 806 "gestures/pinch_gesture.cpp", 807 "gestures/rotation_gesture.cpp", 808 "gestures/slide_gesture.cpp", 809 "gestures/tap_gesture.cpp", 810 "gestures/timeout_gesture.cpp", 811 812 # pipeline 813 "pipeline/base/constants.cpp", 814 "pipeline/base/element_register.cpp", 815 "pipeline/base/related_node.cpp", 816 "pipeline/pipeline_base.cpp", 817 818 # image 819 "image/animated_image_player.cpp", 820 "image/image_cache.cpp", 821 "image/image_compressor.cpp", 822 "image/image_file_cache.cpp", 823 "image/image_loader.cpp", 824 "image/image_object.cpp", 825 "image/image_object_animated.cpp", 826 "image/image_object_svg.cpp", 827 "image/image_provider.cpp", 828 "image/image_source_info.cpp", 829 830 # textfield 831 "common/ime/text_editing_value.cpp", 832 "common/ime/text_input_action.cpp", 833 "common/ime/text_input_client.cpp", 834 "common/ime/text_input_configuration.cpp", 835 "common/ime/text_input_connection.cpp", 836 "common/ime/text_input_formatter.cpp", 837 "common/ime/text_input_proxy.cpp", 838 "common/ime/text_input_type.cpp", 839 840 # properties 841 "components/common/painter/rosen_decoration_painter.cpp", 842 "components/common/properties/alignment.cpp", 843 "components/common/properties/animatable_color.cpp", 844 "components/common/properties/border.cpp", 845 "components/common/properties/border_edge.cpp", 846 "components/common/properties/border_image.cpp", 847 "components/common/properties/clip_path.cpp", 848 "components/common/properties/color.cpp", 849 "components/common/properties/decoration.cpp", 850 "components/common/properties/motion_path_evaluator.cpp", 851 "components/common/properties/shadow.cpp", 852 "components/common/properties/shadow_config.cpp", 853 "components/common/properties/text_style.cpp", 854 "components/common/properties/text_style_parser.cpp", 855 856 # layout 857 "components/common/layout/grid_column_info.cpp", 858 "components/common/layout/grid_container_info.cpp", 859 "components/common/layout/grid_system_manager.cpp", 860 "components/common/layout/screen_system_manager.cpp", 861 862 # v1 deps 863 "$root_out_dir/arkui/framework/core/components/theme/theme_constants_default.cpp", 864 "$root_out_dir/arkui/framework/core/components/theme/theme_constants_tv.cpp", 865 "$root_out_dir/arkui/framework/core/components/theme/theme_constants_watch.cpp", 866 "components/checkable/checkable_theme.cpp", 867 "components/common/painter/rosen_svg_painter.cpp", 868 "components/custom_paint/render_custom_paint_creator.cpp", 869 "components/custom_paint/render_offscreen_canvas_creator.cpp", 870 "components/custom_paint/rosen_render_custom_paint.cpp", 871 "components/dialog/dialog_theme.cpp", 872 "components/font/constants_converter.cpp", 873 "components/font/font_loader_creator.cpp", 874 "components/font/font_manager_creator.cpp", 875 "components/font/rosen_font_collection.cpp", 876 "components/font/rosen_font_loader.cpp", 877 "components/font/rosen_font_manager.cpp", 878 "components/panel/sliding_events.cpp", 879 "components/picker/picker_animation.cpp", 880 "components/picker/picker_data.cpp", 881 "components/picker/picker_theme.cpp", 882 "components/scroll/scrollable.cpp", 883 "components/svg/svg_transform.cpp", 884 "components/theme/app_theme.cpp", 885 "components/theme/blur_style_theme.cpp", 886 "components/theme/icon_theme.cpp", 887 "components/theme/shadow_theme.cpp", 888 "components/theme/theme_attributes.cpp", 889 "components/theme/theme_constants.cpp", 890 "components/theme/theme_manager_impl.cpp", 891 "components/theme/theme_utils.cpp", 892 "components/video/resource/player.cpp", 893 894 # v2 inspector 895 "components_v2/grid/grid_event.cpp", 896 "components_v2/grid_layout/grid_container_utils.cpp", 897 "components_v2/inspector/inspector_constants.cpp", 898 "components_v2/inspector/utils.cpp", 899 900 #declaration 901 "components/declaration/common/declaration.cpp", 902 903 # recorder 904 "common/recorder/event_config.cpp", 905 "common/recorder/event_controller.cpp", 906 "common/recorder/event_recorder.cpp", 907 "common/recorder/exposure_processor.cpp", 908 "common/recorder/inspector_tree_collector.cpp", 909 "common/recorder/node_data_cache.cpp", 910 911 # text 912 "text/text_emoji_processor.cpp", 913 ] 914 915 include_dirs = [ "$ace_root" ] 916 if (is_arkui_x) { 917 include_dirs += [ 918 "//foundation/appframework/ability/ability_runtime/cross_platform/frameworks/native/base/event_handler/include", 919 "//foundation/appframework/ability/ability_runtime/cross_platform/interfaces/inner_api/error", 920 "//foundation/graphic/graphic_2d/utils/color_manager/export", 921 "//foundation/multimedia/image_framework/interfaces/innerkits/include", 922 ] 923 sources -= [ "components/declaration/common/declaration.cpp" ] 924 sources += [ 925 "animation/card_transition_controller.cpp", 926 "components/common/properties/animatable_path.cpp", 927 "components/common/properties/border_image_edge.cpp", 928 "components/common/properties/color_factory.cpp", 929 "components/common/properties/edge.cpp", 930 "components/common/properties/page_transition_option.cpp", 931 "components/common/properties/scroll_bar.cpp", 932 "components/custom_paint/rosen_render_offscreen_canvas.cpp", 933 "components/declaration/common/event.cpp", 934 "components/video/resource/ext_surface.cpp", 935 "components/video/resource/ext_texture.cpp", 936 "components/video/resource/resource.cpp", 937 ] 938 } 939 940 if (platform == "ohos" || platform == "ohos_ng") { 941 sources -= [ "common/anr_thread.cpp" ] 942 } 943 944 configs = [ "$ace_root:ace_config" ] 945 946 deps = [ 947 "$ace_root/frameworks/core/components/theme:build_theme_code", 948 "pipeline_ng:ace_core_pipeline_ng_$platform", 949 ] 950 951 if (defined(config.build_for_preview) && config.build_for_preview) { 952 sources -= [ "common/task_runner_adapter_impl.cpp" ] 953 } 954 955 external_deps = [] 956 if (ace_engine_feature_enable_event_extra_handling && 957 defined( 958 vendor_configs.ace_engine_advanced_enable_event_extra_handling)) { 959 sources += vendor_configs.ace_engine_advanced_enable_event_extra_handling 960 sources += 961 vendor_configs.ace_engine_advanced_enable_event_compatible_handling 962 external_deps += vendor_configs.ace_engine_advanced_enable_event_compatible_handling_deps 963 } else { 964 sources += [ "event/event_info_convertor.cpp" ] 965 } 966 if (use_hilog) { 967 external_deps += [ "hilog:libhilog" ] 968 } 969 if (defined(config.remote_window_support) && config.remote_window_support) { 970 if (!use_mingw_win && !use_mac && !use_linux) { 971 deps += [ "$ace_root/frameworks/core/components_ng/pattern/remote_window:ace_core_components_remote_window_pattern_ng_$platform" ] 972 } 973 } 974 975 if (defined(config.build_container_scope_lib) && 976 config.build_container_scope_lib) { 977 sources -= [ "common/container_scope.cpp" ] 978 if (is_arkui_x) { 979 deps += [ ":ace_container_scope_static" ] 980 } else { 981 deps += [ ":ace_container_scope" ] 982 } 983 } 984 deps += [ 985 "$ace_root/frameworks/core/components_ng/animation:ace_core_components_animation_ng_$platform", 986 "$ace_root/frameworks/core/components_ng/base:ace_core_components_base_ng_$platform", 987 "$ace_root/frameworks/core/components_ng/event:ace_core_components_event_ng_$platform", 988 "$ace_root/frameworks/core/components_ng/gestures:ace_core_components_gestures_ng_$platform", 989 "$ace_root/frameworks/core/components_ng/image_provider:ace_core_components_image_provider_ng_$platform", 990 "$ace_root/frameworks/core/components_ng/layout:ace_core_components_layout_ng_$platform", 991 "$ace_root/frameworks/core/components_ng/manager:ace_core_components_manager_ng_$platform", 992 "$ace_root/frameworks/core/components_ng/pattern:ace_core_components_pattern_ng_$platform", 993 "$ace_root/frameworks/core/components_ng/pattern/rich_editor:ace_core_components_rich_editor_pattern_ng_$platform", 994 "$ace_root/frameworks/core/components_ng/pattern/text_field:ace_core_components_text_field_pattern_ng_$platform", 995 "$ace_root/frameworks/core/components_ng/property:ace_core_components_property_ng_$platform", 996 "$ace_root/frameworks/core/components_ng/render:ace_core_components_render_ng_$platform", 997 "$ace_root/frameworks/core/components_ng/svg:ace_core_components_svg_ng_$platform", 998 "$ace_root/frameworks/core/components_ng/syntax:ace_core_components_syntax_ng_$platform", 999 "$ace_root/frameworks/core/components_ng/token_theme:ace_core_components_token_theme_ng_$platform", 1000 ] 1001 1002 if (defined(config.use_components_lib) && config.use_components_lib) { 1003 deps += [ "$ace_root/frameworks/core/components_ng/common_napi_utils:ace_core_components_common_napi_utils_$platform" ] 1004 } else { 1005 deps += [ "$ace_root/frameworks/core/components_ng/pattern/patternlock:ace_core_components_patternlock_pattern_ng_$platform" ] 1006 if (qrcodegen_support) { 1007 deps += [ "$ace_root/frameworks/core/components_ng/pattern/qrcode:ace_core_components_qrcode_pattern_ng_$platform" ] 1008 } 1009 } 1010 1011 if (defined(config.enable_ability_component) && 1012 config.enable_ability_component) { 1013 deps += [ "$ace_root/frameworks/core/components_ng/pattern/ability_component:ace_core_components_ability_component_pattern_ng_$platform" ] 1014 } 1015 if (defined(config.window_scene_support) && config.window_scene_support) { 1016 deps += [ "$ace_root/frameworks/core/components_ng/pattern/ui_extension:ace_core_components_ui_extension_pattern_ng_$platform" ] 1017 } 1018 if (defined(config.web_components_support) && 1019 config.web_components_support) { 1020 if (!is_arkui_x) { 1021 deps += [ "$ace_root/frameworks/core/components_ng/pattern/web:ace_core_components_web_pattern_ng_$platform" ] 1022 sources += [ 1023 "components/web/resource/web_client_impl.cpp", 1024 "components/web/resource/web_configuration_observer.cpp", 1025 "components/web/resource/web_delegate.cpp", 1026 "components/web/resource/web_javascript_execute_callback.cpp", 1027 "components/web/resource/web_javascript_result_callback.cpp", 1028 "components/web/resource/web_resource.cpp", 1029 "components/web/web_component.cpp", 1030 ] 1031 1032 external_deps += [ 1033 "ability_runtime:abilitykit_native", 1034 "ability_runtime:app_context", 1035 "ability_runtime:app_manager", 1036 "c_utils:utils", 1037 "init:libbegetutil", 1038 "ipc:ipc_core", 1039 "napi:ace_napi", 1040 "webview:libnweb", 1041 "window_manager:libwm", 1042 ] 1043 } else { 1044 deps += [ "$ace_root/frameworks/core/components_ng/pattern/web:ace_core_components_web_pattern_ng_$platform" ] 1045 } 1046 } 1047 if (defined(config.window_scene_support) && config.window_scene_support) { 1048 deps += [ "$ace_root/frameworks/core/components_ng/pattern/ui_extension:ace_core_components_ui_extension_pattern_ng_$platform" ] 1049 } 1050 1051 if (defined(config.form_components_support) && 1052 config.form_components_support) { 1053 if (!use_mingw_win && !use_mac && !use_linux) { 1054 deps += [ "$ace_root/frameworks/core/components_ng/pattern/form:ace_core_components_form_pattern_ng_$platform" ] 1055 } 1056 } 1057 if (defined(config.enable_rosen_backend) && config.enable_rosen_backend) { 1058 sources += [ 1059 "animation/native_curve_helper.cpp", 1060 "common/rosen/rosen_convert_helper.cpp", 1061 ] 1062 if (is_ohos) { 1063 defines += [ "TEXGINE_SUPPORT_FOR_OHOS" ] 1064 } 1065 if (is_arkui_x) { 1066 deps += [ 1067 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics_source_$platform", 1068 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client_static", 1069 ] 1070 } else { 1071 external_deps += [ "graphic_2d:librender_service_client" ] 1072 if (ace_use_rosen_drawing) { 1073 external_deps += [ "graphic_2d:2d_graphics" ] 1074 } 1075 } 1076 } 1077 if (defined(config.window_scene_support) && config.window_scene_support) { 1078 deps += [ 1079 "$ace_root/frameworks/core/components_ng/pattern/ui_extension:ace_core_components_ui_extension_pattern_ng_$platform", 1080 "$ace_root/frameworks/core/components_ng/pattern/window_scene:ace_core_components_window_scene_$platform", 1081 ] 1082 } 1083 1084 if (defined(config.xcomponent_components_support) && 1085 config.xcomponent_components_support) { 1086 deps += [ "$ace_root/frameworks/core/components_ng/pattern/xcomponent:ace_core_components_xcomponent_pattern_ng_$platform" ] 1087 } 1088 1089 # add sources needed by phone, tv and wearable. previews do not need them 1090 if (defined(config.connect_server_support) && 1091 config.connect_server_support) { 1092 if (use_ios) { 1093 include_dirs += [ "$ark_toolchain_path" ] 1094 } 1095 sources += [ "common/connect_server_manager.cpp" ] 1096 } 1097 1098 if (defined(config.hdc_register_support) && config.hdc_register_support) { 1099 sources += [ "common/hdc_register.cpp" ] 1100 } 1101 1102 if (defined(config.plugin_components_support) && 1103 config.plugin_components_support) { 1104 deps += [ "$ace_root/frameworks/core/components_ng/pattern/plugin:ace_core_components_plugin_pattern_ng_$platform" ] 1105 sources += [ "common/plugin_manager.cpp" ] 1106 external_deps += [ "c_utils:utils" ] 1107 } 1108 1109 deps += [ "$ace_root/frameworks/core/components_ng/pattern/security_component:ace_core_components_security_component_pattern_ng_$platform" ] 1110 1111 if (defined(config.model_component_support) && 1112 config.model_component_support) { 1113 deps += [ "$ace_root/frameworks/core/components_ng/pattern/model:ace_core_components_model_pattern_ng_$platform" ] 1114 } 1115 1116 if (defined(config.enable_image_compression) && 1117 config.enable_image_compression) { 1118 external_deps += [ "opencl-headers:libcl" ] 1119 defines += [ "ENABLE_OPENCL" ] 1120 } 1121 1122 if (defined(config.use_platform_font) && config.use_platform_font) { 1123 defines += [ "USE_PLATFORM_FONT" ] 1124 sources += [ "common/font/font_platform_proxy.cpp" ] 1125 } 1126 1127 cflags_cc = [] 1128 cflags_cc += invoker.cflags_cc 1129 } 1130} 1131 1132foreach(item, ace_platforms) { 1133 ace_core_source_set("ace_core_" + item.name) { 1134 platform = item.name 1135 1136 if (defined(item.config)) { 1137 config = item.config 1138 } else { 1139 config = { 1140 } 1141 } 1142 1143 if (defined(config.defines)) { 1144 defines = config.defines 1145 } else { 1146 defines = [] 1147 } 1148 1149 if (defined(config.cflags_cc)) { 1150 cflags_cc = config.cflags_cc 1151 } else { 1152 cflags_cc = [] 1153 } 1154 } 1155 1156 ace_core_ng_source_set("ace_core_ng_" + item.name) { 1157 platform = item.name 1158 1159 if (defined(item.config)) { 1160 config = item.config 1161 } else { 1162 config = { 1163 } 1164 } 1165 1166 if (defined(config.defines)) { 1167 defines = config.defines 1168 } else { 1169 defines = [] 1170 } 1171 1172 if (defined(config.cflags_cc)) { 1173 cflags_cc = config.cflags_cc 1174 } else { 1175 cflags_cc = [] 1176 } 1177 } 1178} 1179