1# Copyright (C) 2023 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/graphic/graphic_2d/rosen/modules/platform/config.gni") 16 17# ace_skia {{{ 18group("ace_skia") { 19 public_deps = [ "//third_party/skia:skia_$platform" ] 20} 21 22# ace_skia }}} 23 24# eventhandler {{{ 25group("eventhandler") { 26 if (platform == "ohos") { 27 public_deps = eventhandler_deps 28 } else if (cross_platform) { 29 public_deps = [ "$appframework_root/ability/ability_runtime/cross_platform/frameworks/native/base/event_handler:cross_platform_event_handler" ] 30 } else { 31 public_deps = [ ":impl_eventhandler" ] 32 } 33} 34 35config("eventhandler_config") { 36 include_dirs = [ "eventhandler" ] 37} 38 39ohos_source_set("impl_eventhandler") { 40 public_configs = [ ":eventhandler_config" ] 41 sources = [ 42 "eventhandler_impl/epoll_io_waiter_mingw.cpp", 43 "eventhandler_impl/event_handler.cpp", 44 "eventhandler_impl/event_queue.cpp", 45 "eventhandler_impl/event_runner.cpp", 46 "eventhandler_impl/file_descriptor_listener.cpp", 47 "eventhandler_impl/inner_event.cpp", 48 "eventhandler_impl/native_implement_eventhandler.cpp", 49 "eventhandler_impl/none_io_waiter.cpp", 50 ] 51 defines = [ "LOG_DOMAIN=0xD001200" ] 52 cflags = [ "-std=c++17" ] 53 deps = [ 54 ":utils", 55 "//third_party/libuv:uv", 56 ] 57 external_deps = [ "hilog:libhilog" ] 58 part_name = "graphic_2d" 59 subsystem_name = "graphic" 60} 61 62# eventhandler }}} 63 64# hilog {{{ 65ohos_source_set("hilog") { 66 if (current_os == "android" || current_os == "ios") { 67 public_deps = hilog_deps 68 } else { 69 external_deps = [ "hilog:libhilog" ] 70 } 71 part_name = "graphic_2d" 72 subsystem_name = "graphic" 73} 74 75# hilog }}} 76 77# image_native {{{ 78group("image_native") { 79 if (platform == "ohos") { 80 public_deps = image_deps 81 } else if (platform == "android" || platform == "ios") { 82 public_deps = [ "$image_framework_root/interfaces/innerkits:image_native" ] 83 } else { 84 public_deps = [ ":mock_image_native" ] 85 } 86} 87 88config("image_native_config") { 89 include_dirs = [ "image_native" ] 90} 91 92ohos_source_set("mock_image_native") { 93 public_configs = [ ":image_native_config" ] 94 sources = [ "image_native/pixel_map.cpp" ] 95 deps = [ ":utils" ] 96 cflags = [ "-DIMAGE_COLORSPACE_FLAG" ] 97 part_name = "graphic_2d" 98 subsystem_name = "graphic" 99} 100 101# image_native }}} 102 103# ipc_core {{{ 104group("ipc_core") { 105 if (platform == "ohos") { 106 public_deps = ipc_deps 107 } else { 108 public_deps = [ ":mock_ipc_core" ] 109 } 110} 111 112config("ipc_core_config") { 113 include_dirs = [ "ipc_core" ] 114} 115 116ohos_source_set("mock_ipc_core") { 117 public_configs = [ ":ipc_core_config" ] 118 sources = [ 119 "ipc_core/ipc_object_stub.cpp", 120 "ipc_core/iremote_broker.cpp", 121 "ipc_core/iremote_object.cpp", 122 "ipc_core/message_option.cpp", 123 "ipc_core/message_parcel.cpp", 124 "ipc_core/peer_holder.cpp", 125 ] 126 deps = [ ":utils" ] 127 part_name = "graphic_2d" 128 subsystem_name = "graphic" 129} 130 131# ipc_core }}} 132 133# utils {{{ 134group("utils") { 135 if (platform == "ohos") { 136 public_deps = utils_deps 137 } else if (platform == "android" || platform == "ios") { 138 public_deps = [ "$c_utils_root/base:utilsbase" ] 139 } else { 140 public_deps = [ ":mock_utils" ] 141 } 142 if (platform == "ios") { 143 public_configs = [ ":ios_utils_config" ] 144 } 145} 146 147config("utils_config") { 148 include_dirs = [ "utils" ] 149} 150 151config("ios_utils_config") { 152 defines = [ "IOS_PLATFORM" ] 153} 154 155ohos_source_set("mock_utils") { 156 if (current_os == "ios") { 157 public_configs = [ ":ios_utils_config" ] 158 public_deps = [ "$c_utils_root/base:utilsbase" ] 159 } else { 160 public_configs = [ ":utils_config" ] 161 sources = [ 162 "utils/directory_ex.cpp", 163 "utils/parcel.cpp", 164 "utils/refbase.cpp", 165 ] 166 public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 167 } 168 part_name = "graphic_2d" 169 subsystem_name = "graphic" 170} 171# utils }}} 172