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