# 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") { sources = [ "//third_party/bounds_checking_function/src/memset_s.c", "//third_party/bounds_checking_function/src/securecutil.c", "//third_party/bounds_checking_function/src/secureinput_w.c", "//third_party/bounds_checking_function/src/secureprintoutput_a.c", "//third_party/bounds_checking_function/src/secureprintoutput_w.c", ] cflags = [ "-Wno-inconsistent-dllimport" ] } configs = [ "//third_party/bounds_checking_function:libsec_public_config" ] } } 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/data_detector_adapter.cpp", "advance/data_detector_mgr.cpp", "advance/image_analyzer_mgr.cpp", "app_bar_helper_impl.cpp", "download_manager_preview.cpp", "event_report.cpp", "exception_handler.cpp", "fetch_manager.cpp", "file_uri_helper_preview.cpp", "frame_report.cpp", "image_source_preview.cpp", "modal_ui_extension_impl.cpp", "mouse_style_ohos.cpp", "pixel_map_preview.cpp", "response_data.cpp", "ressched_report.cpp", "socperf_client_impl.cpp", "stage_card_parser.cpp", "system_properties.cpp", "task/task_runner_adapter_impl.cpp", "time_event_proxy_preview.cpp", "trace_id_impl.cpp", "view_data_wrap_impl.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", "//third_party/curl:curl_shared", ] external_deps = [ "hilog:libhilog" ] configs = [ "$ace_root:ace_config", "//third_party/curl:curl_config", ] include_dirs = [ "//commonlibrary/c_utils/base/include" ] 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" ] } } } }