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