# Copyright (C) 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/graphic/graphic_2d/rosen/modules/platform/config.gni") # ace_skia {{{ group("ace_skia") { if (is_arkui_x) { public_deps = [ "//third_party/skia:skia_$platform" ] } else { public_external_deps = [ "skia:skia_canvaskit" ] } } # ace_skia }}} # eventhandler {{{ group("eventhandler") { if (platform == "ohos") { public_external_deps = [ "eventhandler:libeventhandler" ] } else if (cross_platform) { public_deps = [ "$appframework_root/ability/ability_runtime/cross_platform/frameworks/native/base/event_handler:cross_platform_event_handler" ] } else { public_deps = [ ":impl_eventhandler" ] } } config("eventhandler_config") { include_dirs = [ "eventhandler" ] } ohos_source_set("impl_eventhandler") { public_configs = [ ":eventhandler_config" ] sources = [ "eventhandler_impl/epoll_io_waiter_mingw.cpp", "eventhandler_impl/event_handler.cpp", "eventhandler_impl/event_queue.cpp", "eventhandler_impl/event_runner.cpp", "eventhandler_impl/file_descriptor_listener.cpp", "eventhandler_impl/inner_event.cpp", "eventhandler_impl/native_implement_eventhandler.cpp", "eventhandler_impl/none_io_waiter.cpp", ] defines = [ "LOG_DOMAIN=0xD001200" ] cflags = [ "-std=c++17" ] deps = [ ":utils" ] external_deps = [ "hilog:libhilog", "libuv:uv", ] if (is_arkui_x) { defines += [ "CROSSPLATFORM" ] } part_name = "graphic_2d" subsystem_name = "graphic" } # eventhandler }}} # hilog {{{ ohos_source_set("hilog") { if (current_os == "android" || current_os == "ios") { public_deps = hilog_deps } else { external_deps = [ "hilog:libhilog" ] } part_name = "graphic_2d" subsystem_name = "graphic" } # hilog }}} # image_native {{{ group("image_native") { if (platform == "ohos") { public_external_deps = [ "image_framework:image_native" ] } else if (platform == "android" || platform == "ios") { public_external_deps = [ "image_framework:image_native" ] } else { public_deps = [ ":mock_image_native" ] } } config("image_native_config") { include_dirs = [ "image_native" ] } ohos_source_set("mock_image_native") { public_configs = [ ":image_native_config" ] sources = [ "image_native/pixel_map.cpp" ] deps = [ ":utils" ] cflags = [ "-DIMAGE_COLORSPACE_FLAG" ] part_name = "graphic_2d" subsystem_name = "graphic" } # image_native }}} # ipc_core {{{ group("ipc_core") { if (platform == "ohos") { public_external_deps = [ "ipc:ipc_core" ] } else { public_deps = [ ":mock_ipc_core" ] } } config("ipc_core_config") { include_dirs = [ "ipc_core" ] } ohos_source_set("mock_ipc_core") { public_configs = [ ":ipc_core_config" ] sources = [ "ipc_core/ipc_object_stub.cpp", "ipc_core/iremote_broker.cpp", "ipc_core/iremote_object.cpp", "ipc_core/message_option.cpp", "ipc_core/message_parcel.cpp", "ipc_core/peer_holder.cpp", ] deps = [ ":utils" ] part_name = "graphic_2d" subsystem_name = "graphic" } # ipc_core }}} # utils {{{ group("utils") { defines = [] if (platform == "ohos") { public_external_deps = [ "c_utils:utils" ] } else if (platform == "android" || platform == "ios") { public_external_deps = [ "c_utils:utilsbase" ] } else { public_deps = [ ":mock_utils" ] } if (is_emulator) { defines += [ "ROSEN_EMULATOR" ] } else { defines += [] } if (platform == "ios") { public_configs = [ ":ios_utils_config" ] } } config("utils_config") { include_dirs = [ "utils" ] } config("ios_utils_config") { defines = [ "IOS_PLATFORM" ] } ohos_source_set("mock_utils") { public_external_deps = [] if (current_os == "ios") { public_configs = [ ":ios_utils_config" ] public_external_deps += [ "c_utils:utilsbase" ] } else { public_configs = [ ":utils_config" ] sources = [ "utils/directory_ex.cpp", "utils/parcel.cpp", "utils/refbase.cpp", ] public_external_deps += [ "bounds_checking_function:libsec_shared" ] } part_name = "graphic_2d" subsystem_name = "graphic" } # utils }}}