# Copyright (c) 2021-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//foundation/arkui/ace_engine/ace_config.gni") ohos_source_set("utilsecurec_source") { subsystem_name = ace_engine_subsystem part_name = ace_engine_part if (defined(current_platform.name)) { platform = current_platform.name defines = [] config = { } if (defined(current_platform.config)) { config = current_platform.config } if (defined(config.defines)) { defines += config.defines } if (platform == "windows") { external_deps = [ "bounds_checking_function:libsec_shared" ] cflags = [ "-Wno-inconsistent-dllimport" ] } } } ohos_source_set("preview_osal_source") { subsystem_name = ace_engine_subsystem part_name = ace_engine_part if (defined(current_platform.name)) { platform = current_platform.name defines = [] config = { } if (defined(current_platform.config)) { config = current_platform.config } if (defined(config.defines)) { defines += config.defines } sources = [ "${ace_root}/adapter/ohos/osal/log_wrapper.cpp", "ace_checker.cpp", "ace_engine_ext.cpp", "ace_trace.cpp", "advance/ai_write_adapter.cpp", "advance/data_detector_adapter.cpp", "advance/data_detector_mgr.cpp", "advance/image_analyzer_adapter_impl.cpp", "advance/image_analyzer_manager.cpp", "advance/image_analyzer_mgr.cpp", "app_bar_helper_impl.cpp", "display_info_utils.cpp", "download_manager_preview.cpp", "drawing_color_filter_preview.cpp", "drawing_lattice_preview.cpp", "event_report.cpp", "exception_handler.cpp", "fetch_manager.cpp", "file_uri_helper_preview.cpp", "frame_report.cpp", "image_packer_preview.cpp", "image_source_preview.cpp", "input_method_manager_preview.cpp", "modal_ui_extension_impl.cpp", "mouse_style_ohos.cpp", "package_event_proxy_preview.cpp", "pixel_map_preview.cpp", "response_data.cpp", "ressched_report.cpp", "socperf_client_impl.cpp", "stage_card_parser.cpp", "stylus_detector_default.cpp", "stylus_detector_loader.cpp", "stylus_detector_mgr.cpp", "system_bar_style_ohos.cpp", "system_properties.cpp", "task/task_runner_adapter_impl.cpp", "thread_priority.cpp", "time_event_proxy_preview.cpp", "trace_id_impl.cpp", "view_data_wrap_impl.cpp", "want_wrap_preview.cpp", ] if (defined(resourceschedule_ffrt_support) && resourceschedule_ffrt_support) { sources += [ "long_frame_report_impl.cpp" ] } cflags_cc = [ "-DNAME_MAX=128", "-Wno-inconsistent-dllimport", ] deps = [ ":utilsecurec_source", "//foundation/graphic/graphic_2d/rosen/modules/platform:image_native", ] external_deps = [ "curl:curl_shared", "hilog:libhilog", "window_manager:previewer_window", ] if (ace_use_rosen_drawing) { external_deps += [ "graphic_2d:2d_graphics", "graphic_2d:drawing_napi_impl", ] } configs = [ "$ace_root:ace_config" ] if (is_ohos_standard_system) { sources += [ "${ace_root}/adapter/ohos/osal/resource_theme_style.cpp", "frame_trace_adapter_impl.cpp", "resource_adapter_impl_standard.cpp", "resource_convertor.cpp", ] defines += [ "OHOS_STANDARD_SYSTEM" ] if (platform == "windows") { deps += [ "//base/global/resource_management/frameworks/resmgr:global_resmgr_win" ] } else if (platform == "mac") { deps += [ "//base/global/resource_management/frameworks/resmgr:global_resmgr_mac" ] } else if (platform == "linux") { deps += [ "//base/global/resource_management/frameworks/resmgr:global_resmgr_linux" ] } external_deps += [ "napi:ace_napi" ] } else { sources += [ "frame_trace_adapter_impl.cpp", "resource_adapter_impl.cpp", ] include_dirs = [ "//prebuilts/ace-toolkit/preview/rich/include/resmgr/resourcemanager/include" ] if (platform == "windows") { defines += [ "NOGDI" ] libs = [ "//prebuilts/ace-toolkit/preview/rich/lib/windows/tv/libresourcemanager_win.lib" ] } else if (platform == "mac") { libs = [ "//prebuilts/ace-toolkit/preview/rich/lib/mac/tv/libresourcemanager_mac.dylib" ] } else if (platform == "linux") { libs = [ "//prebuilts/ace-toolkit/preview/rich/lib/linux/tv/libresourcemanager_linux.so" ] } } } }