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