Jamie Madill | 9190f49 | 2019-12-16 21:03:57 | [diff] [blame] | 1 | # Copyright 2019 The ANGLE Project Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | import("../gni/angle.gni") |
| 6 | |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 7 | _util_sources = [ |
Wez | bb654cf | 2020-02-15 22:54:44 | [diff] [blame] | 8 | "EGLPlatformParameters.h", |
| 9 | "EGLWindow.cpp", |
| 10 | "EGLWindow.h", |
| 11 | "Event.h", |
| 12 | "Matrix.cpp", |
| 13 | "Matrix.h", |
| 14 | "OSPixmap.h", |
| 15 | "OSWindow.cpp", |
| 16 | "OSWindow.h", |
Roman Lavrov | 21f16cb | 2023-06-09 21:30:38 | [diff] [blame] | 17 | "autogen/angle_features_autogen.cpp", |
| 18 | "autogen/angle_features_autogen.h", |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 19 | "com_utils.h", |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 20 | "geometry_utils.cpp", |
| 21 | "geometry_utils.h", |
Wez | bb654cf | 2020-02-15 22:54:44 | [diff] [blame] | 22 | "keyboard.h", |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 23 | "mouse.h", |
| 24 | "random_utils.cpp", |
| 25 | "random_utils.h", |
| 26 | "shader_utils.cpp", |
| 27 | "shader_utils.h", |
| 28 | "util_export.h", |
| 29 | "util_gl.h", |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 30 | ] |
| 31 | |
| 32 | if (is_win) { |
| 33 | _util_sources += [ "windows/WGLWindow.h" ] |
| 34 | if (!angle_is_winuwp) { |
| 35 | _util_sources += [ |
| 36 | "windows/win32/Win32Pixmap.cpp", |
| 37 | "windows/win32/Win32Pixmap.h", |
| 38 | "windows/win32/Win32Window.cpp", |
| 39 | "windows/win32/Win32Window.h", |
| 40 | ] |
| 41 | } |
| 42 | } |
| 43 | |
Xiaoxuan Liu | 61180d0 | 2020-10-12 08:40:13 | [diff] [blame] | 44 | if (is_linux) { |
| 45 | _util_sources += [ |
| 46 | "display/DisplayPixmap.cpp", |
| 47 | "display/DisplayWindow.cpp", |
| 48 | "display/DisplayWindow.h", |
| 49 | ] |
| 50 | } |
| 51 | |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 52 | if (angle_use_x11) { |
| 53 | _util_sources += [ |
Antonio Caggiano | 9ad43bd | 2021-12-09 15:52:35 | [diff] [blame] | 54 | "linux/x11/X11Pixmap.cpp", |
| 55 | "linux/x11/X11Pixmap.h", |
| 56 | "linux/x11/X11Window.cpp", |
| 57 | "linux/x11/X11Window.h", |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 58 | ] |
| 59 | } |
| 60 | |
Antonio Caggiano | 9ad43bd | 2021-12-09 15:52:35 | [diff] [blame] | 61 | if (angle_use_wayland) { |
| 62 | _util_sources += [ |
| 63 | "linux/wayland/WaylandWindow.cpp", |
| 64 | "linux/wayland/WaylandWindow.h", |
| 65 | ] |
| 66 | } |
| 67 | |
| 68 | if (angle_use_x11 || angle_use_wayland) { |
| 69 | _util_sources += [ "linux/LinuxWindow.cpp" ] |
| 70 | } |
| 71 | |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 72 | if (is_fuchsia) { |
| 73 | _util_sources += [ |
Geoff Lang | 4e6f654 | 2020-04-16 20:31:24 | [diff] [blame] | 74 | "fuchsia/FuchsiaPixmap.cpp", |
| 75 | "fuchsia/FuchsiaPixmap.h", |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 76 | "fuchsia/ScenicWindow.cpp", |
| 77 | "fuchsia/ScenicWindow.h", |
| 78 | ] |
Antonio Caggiano | fcd6e26 | 2022-04-13 13:39:21 | [diff] [blame] | 79 | } else if (use_ozone && !(angle_use_x11 || angle_use_wayland)) { |
Maksim Sisov | 0a3233f | 2020-07-29 07:35:04 | [diff] [blame] | 80 | # Use X11 impl by default otherwise switch to fake Ozone impl that does not |
| 81 | # seem to do anything real. |
| 82 | # TODO(msisov): probably, we need to have a proper support for different |
| 83 | # Ozone backends, and be able to switch between them for proper tests. |
| 84 | # For example, Wayland, X11, etc. |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 85 | _util_sources += [ |
| 86 | "ozone/OzonePixmap.cpp", |
| 87 | "ozone/OzoneWindow.cpp", |
| 88 | "ozone/OzoneWindow.h", |
| 89 | ] |
| 90 | } |
| 91 | |
| 92 | if (is_mac) { |
| 93 | _util_sources += [ |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 94 | "osx/OSXPixmap.h", |
Wez | bb654cf | 2020-02-15 22:54:44 | [diff] [blame] | 95 | "osx/OSXPixmap.mm", |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 96 | "osx/OSXWindow.h", |
Wez | bb654cf | 2020-02-15 22:54:44 | [diff] [blame] | 97 | "osx/OSXWindow.mm", |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 98 | ] |
| 99 | } |
| 100 | |
James Darpinian | 0dbe7cd | 2020-12-08 20:24:35 | [diff] [blame] | 101 | if (is_ios) { |
| 102 | _util_sources += [ |
| 103 | "ios/IOSPixmap.h", |
| 104 | "ios/IOSPixmap.mm", |
| 105 | "ios/IOSWindow.h", |
| 106 | "ios/IOSWindow.mm", |
| 107 | ] |
| 108 | } |
| 109 | |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 110 | if (is_android) { |
| 111 | _util_sources += [ |
| 112 | "android/AndroidPixmap.cpp", |
| 113 | "android/AndroidWindow.cpp", |
| 114 | "android/AndroidWindow.h", |
| 115 | "android/third_party/android_native_app_glue.c", |
| 116 | "android/third_party/android_native_app_glue.h", |
| 117 | ] |
| 118 | } |
| 119 | |
Amirali Abdolrashidi | f62405c | 2022-11-01 01:47:52 | [diff] [blame] | 120 | # Backtrace utils |
| 121 | if (is_linux) { |
| 122 | _util_sources += [ "linux/linux_backtrace.cpp" ] |
| 123 | } |
| 124 | |
| 125 | if (is_fuchsia) { |
| 126 | _util_sources += [ "fuchsia/fuchsia_backtrace.cpp" ] |
| 127 | } |
| 128 | |
| 129 | if (is_ios) { |
| 130 | _util_sources += [ "ios/ios_backtrace.cpp" ] |
| 131 | } |
| 132 | |
| 133 | if (is_mac) { |
| 134 | _util_sources += [ "osx/osx_backtrace.cpp" ] |
| 135 | } |
| 136 | |
| 137 | if (is_android) { |
| 138 | _util_sources += [ "android/android_backtrace.cpp" ] |
| 139 | } |
| 140 | |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 141 | config("angle_util_loader_config") { |
| 142 | defines = [ "ANGLE_USE_UTIL_LOADER" ] |
| 143 | } |
| 144 | |
| 145 | config("angle_util_loader_headers_config") { |
Jamie Madill | 5df2c9e | 2020-03-15 21:28:43 | [diff] [blame] | 146 | # Force users to include "util/header.h" instead of just "header.h". |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 147 | include_dirs = [ ".." ] |
| 148 | } |
| 149 | |
| 150 | angle_source_set("angle_util_loader_headers") { |
| 151 | testonly = true |
| 152 | sources = [ |
| 153 | "egl_loader_autogen.h", |
| 154 | "gles_loader_autogen.h", |
| 155 | "util_export.h", |
| 156 | ] |
| 157 | |
| 158 | if (is_win && !angle_is_winuwp) { |
| 159 | sources += [ "windows/wgl_loader_autogen.h" ] |
| 160 | } |
| 161 | |
Wez | bb654cf | 2020-02-15 22:54:44 | [diff] [blame] | 162 | public_deps = [ "$angle_root:includes" ] |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 163 | |
| 164 | public_configs = [ ":angle_util_loader_headers_config" ] |
| 165 | } |
| 166 | |
| 167 | angle_source_set("angle_util_loader") { |
| 168 | testonly = true |
| 169 | defines = [ "LIBANGLE_UTIL_IMPLEMENTATION" ] |
| 170 | |
| 171 | sources = [ |
| 172 | "egl_loader_autogen.cpp", |
| 173 | "gles_loader_autogen.cpp", |
| 174 | ] |
| 175 | |
| 176 | if (is_win && !angle_is_winuwp) { |
| 177 | sources += [ "windows/wgl_loader_autogen.cpp" ] |
| 178 | } |
| 179 | |
Wez | bb654cf | 2020-02-15 22:54:44 | [diff] [blame] | 180 | deps = [ ":angle_util_loader_headers" ] |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 181 | |
| 182 | public_configs += [ |
| 183 | "$angle_root:no_gl_prototypes", |
| 184 | ":angle_util_config", |
| 185 | ":angle_util_loader_config", |
| 186 | ":angle_util_loader_headers_config", |
| 187 | ] |
| 188 | } |
| 189 | |
Jamie Madill | 3da24b5 | 2022-05-16 09:58:59 | [diff] [blame] | 190 | config("angle_trace_loader_config") { |
| 191 | include_dirs = [ "$angle_root/util/capture" ] |
| 192 | } |
| 193 | |
| 194 | angle_shared_library("angle_trace_loader") { |
| 195 | defines = [ "ANGLE_TRACE_LOADER_IMPLEMENTATION" ] |
| 196 | |
| 197 | sources = [ |
Jamie Madill | 3da24b5 | 2022-05-16 09:58:59 | [diff] [blame] | 198 | "capture/trace_egl_loader_autogen.cpp", |
| 199 | "capture/trace_egl_loader_autogen.h", |
| 200 | "capture/trace_gles_loader_autogen.cpp", |
| 201 | "capture/trace_gles_loader_autogen.h", |
| 202 | "capture/traces_export.h", |
| 203 | ] |
| 204 | deps = [ |
| 205 | "$angle_root:angle_common", |
| 206 | "$angle_root:angle_compression", |
| 207 | ] |
| 208 | |
| 209 | public_configs += [ |
| 210 | "$angle_root:no_gl_prototypes", |
| 211 | ":angle_trace_loader_config", |
| 212 | ] |
| 213 | } |
| 214 | |
Jamie Madill | d25911d | 2022-10-11 00:59:53 | [diff] [blame] | 215 | angle_source_set("angle_trace_fixture") { |
| 216 | testonly = true |
| 217 | defines = [ "ANGLE_REPLAY_IMPLEMENTATION" ] |
| 218 | suppressed_configs += [ "$angle_root:constructor_and_destructor_warnings" ] |
| 219 | sources = [ |
| 220 | "capture/angle_trace_gl.h", |
| 221 | "capture/trace_fixture.cpp", |
| 222 | "capture/trace_fixture.h", |
Roman Lavrov | 5215293 | 2023-06-06 19:36:36 | [diff] [blame] | 223 | "capture/trace_interface.h", |
Jamie Madill | d25911d | 2022-10-11 00:59:53 | [diff] [blame] | 224 | ] |
| 225 | public_deps = [ |
| 226 | ":angle_trace_loader", |
Mark Lobodzinski | 7181239 | 2025-04-04 20:13:58 | [diff] [blame] | 227 | "$angle_root:angle_capture_common", |
Jamie Madill | d25911d | 2022-10-11 00:59:53 | [diff] [blame] | 228 | "$angle_root:includes", |
| 229 | ] |
| 230 | if (is_ios) { |
| 231 | # shared libraries are hidden inside ios_framework_bundle, but we include headers from them |
| 232 | check_includes = false |
| 233 | } |
| 234 | } |
| 235 | |
Alex Dean | c0d806b | 2025-02-11 07:01:33 | [diff] [blame] | 236 | if (angle_enable_cl) { |
| 237 | angle_source_set("angle_trace_fixture_cl") { |
| 238 | testonly = true |
| 239 | defines = [ "ANGLE_REPLAY_IMPLEMENTATION" ] |
| 240 | suppressed_configs += [ "$angle_root:constructor_and_destructor_warnings" ] |
| 241 | sources = [ |
| 242 | "capture/trace_fixture_cl.cpp", |
| 243 | "capture/trace_fixture_cl.h", |
| 244 | "capture/trace_interface.h", |
| 245 | ] |
| 246 | public_deps = [ |
| 247 | ":angle_trace_loader", |
Mark Lobodzinski | 7181239 | 2025-04-04 20:13:58 | [diff] [blame] | 248 | "$angle_root:angle_capture_common", |
Alex Dean | c0d806b | 2025-02-11 07:01:33 | [diff] [blame] | 249 | "$angle_root:includes", |
| 250 | ] |
| 251 | if (is_ios) { |
| 252 | # shared libraries are hidden inside ios_framework_bundle, but we include headers from them |
| 253 | check_includes = false |
| 254 | } |
| 255 | } |
| 256 | } |
| 257 | |
Jamie Madill | 6193274 | 2022-10-11 01:00:12 | [diff] [blame] | 258 | if (angle_has_frame_capture) { |
| 259 | config("angle_frame_capture_test_utils_config") { |
| 260 | include_dirs = [ "$angle_root/util/capture" ] |
| 261 | } |
| 262 | |
| 263 | angle_source_set("angle_frame_capture_test_utils") { |
| 264 | testonly = true |
Cody Northrop | 35461e6 | 2023-04-13 02:02:08 | [diff] [blame] | 265 | |
| 266 | if (restricted_traces_outside_of_apk) { |
| 267 | # On Android, if we are building the entire trace library, |
| 268 | # we need to load the libraries from outside the APK |
| 269 | defines = [ "ANGLE_TRACE_EXTERNAL_BINARIES" ] |
| 270 | } |
| 271 | |
Jamie Madill | 6193274 | 2022-10-11 01:00:12 | [diff] [blame] | 272 | sources = [ |
Jamie Madill | 6193274 | 2022-10-11 01:00:12 | [diff] [blame] | 273 | "capture/frame_capture_test_utils.cpp", |
| 274 | "capture/frame_capture_test_utils.h", |
Roman Lavrov | 5215293 | 2023-06-06 19:36:36 | [diff] [blame] | 275 | "capture/trace_interface.h", |
Roman Lavrov | 2c7f31a | 2023-04-13 15:47:34 | [diff] [blame] | 276 | ] |
| 277 | deps = [ "$angle_root/third_party/rapidjson" ] |
| 278 | |
| 279 | public_configs += [ ":angle_frame_capture_test_utils_config" ] |
| 280 | public_deps = [ |
| 281 | "$angle_root:angle_capture_common", |
| 282 | "$angle_root:angle_common", |
| 283 | "$angle_root:angle_compression", |
| 284 | ] |
| 285 | } |
| 286 | |
| 287 | angle_shared_library("angle_trace_interpreter") { |
| 288 | testonly = true |
| 289 | sources = [ |
| 290 | "capture/frame_capture_replay_autogen.cpp", |
Jamie Madill | dc62b3e | 2022-10-11 01:00:16 | [diff] [blame] | 291 | "capture/trace_interpreter.cpp", |
| 292 | "capture/trace_interpreter.h", |
| 293 | "capture/trace_interpreter_autogen.cpp", |
Jamie Madill | 6193274 | 2022-10-11 01:00:12 | [diff] [blame] | 294 | ] |
| 295 | deps = [ |
Roman Lavrov | 2c7f31a | 2023-04-13 15:47:34 | [diff] [blame] | 296 | ":angle_frame_capture_test_utils", |
Jamie Madill | 6193274 | 2022-10-11 01:00:12 | [diff] [blame] | 297 | ":angle_trace_fixture", |
| 298 | ":angle_trace_loader", |
Jamie Madill | 6193274 | 2022-10-11 01:00:12 | [diff] [blame] | 299 | ] |
Roman Lavrov | 2c7f31a | 2023-04-13 15:47:34 | [diff] [blame] | 300 | defines = [ "ANGLE_REPLAY_IMPLEMENTATION" ] |
Jamie Madill | 6193274 | 2022-10-11 01:00:12 | [diff] [blame] | 301 | } |
| 302 | } |
| 303 | |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 304 | config("angle_util_config") { |
Jamie Madill | 5df2c9e | 2020-03-15 21:28:43 | [diff] [blame] | 305 | # Force users to include "util/header.h" instead of just "header.h". |
| 306 | include_dirs = [ ".." ] |
Hidehiko Abe | 90a9cf9 | 2020-09-10 17:40:34 | [diff] [blame] | 307 | if ((is_linux || is_chromeos) && angle_use_x11) { |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 308 | libs = [ "X11" ] |
| 309 | } |
Antonio Caggiano | 7b0f631 | 2022-03-30 12:16:02 | [diff] [blame] | 310 | configs = [ "$angle_root:angle_vulkan_wayland_config" ] |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 311 | } |
| 312 | |
| 313 | foreach(is_shared_library, |
| 314 | [ |
| 315 | true, |
| 316 | false, |
| 317 | ]) { |
| 318 | if (is_shared_library) { |
| 319 | library_type = "angle_shared_library" |
| 320 | library_name = "angle_util" |
| 321 | dep_suffix = "${angle_libs_suffix}" |
| 322 | } else { |
| 323 | library_type = "angle_static_library" |
| 324 | library_name = "angle_util_static" |
| 325 | dep_suffix = "_static" |
| 326 | } |
| 327 | |
| 328 | target(library_type, library_name) { |
| 329 | testonly = true |
| 330 | sources = _util_sources |
Jamie Madill | 5df2c9e | 2020-03-15 21:28:43 | [diff] [blame] | 331 | public_deps = [ |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 332 | ":angle_test_utils", |
| 333 | ":angle_util_loader_headers", |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 334 | ] |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 335 | libs = [] |
| 336 | |
Hidehiko Abe | 90a9cf9 | 2020-09-10 17:40:34 | [diff] [blame] | 337 | if (is_linux || is_chromeos) { |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 338 | libs += [ |
| 339 | "rt", |
| 340 | "dl", |
| 341 | ] |
| 342 | } |
| 343 | |
Shahbaz Youssefi | 5b8dec5 | 2021-01-12 04:11:56 | [diff] [blame] | 344 | if (is_apple) { |
James Darpinian | dea8629 | 2020-12-03 00:26:03 | [diff] [blame] | 345 | frameworks = [ "QuartzCore.framework" ] |
| 346 | if (is_mac) { |
| 347 | frameworks += [ "AppKit.framework" ] |
| 348 | } |
James Darpinian | 0dbe7cd | 2020-12-08 20:24:35 | [diff] [blame] | 349 | if (is_ios) { |
| 350 | frameworks += [ "UIKit.framework" ] |
| 351 | } |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 352 | } |
| 353 | |
| 354 | if (is_android) { |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 355 | libs += [ |
| 356 | "android", |
| 357 | "log", |
| 358 | ] |
| 359 | } |
| 360 | |
| 361 | configs += [ "$angle_root:debug_annotations_config" ] |
| 362 | |
| 363 | public_configs += [ ":angle_util_config" ] |
| 364 | |
| 365 | if (is_fuchsia) { |
| 366 | public_deps += [ |
| 367 | "$angle_root/src/common/fuchsia_egl", |
Caroline Liu | 879598f | 2023-11-10 21:38:01 | [diff] [blame] | 368 | "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.element", |
Wez | bb654cf | 2020-02-15 22:54:44 | [diff] [blame] | 369 | "//third_party/fuchsia-sdk/sdk/pkg/async-loop-cpp", |
| 370 | "//third_party/fuchsia-sdk/sdk/pkg/async-loop-default", |
| 371 | "//third_party/fuchsia-sdk/sdk/pkg/fdio", |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 372 | ] |
| 373 | } |
| 374 | |
| 375 | if (is_shared_library) { |
| 376 | defines = [ "LIBANGLE_UTIL_IMPLEMENTATION" ] |
| 377 | |
| 378 | public_deps += [ ":angle_util_loader" ] |
| 379 | |
Kyle Piddington | d33a222 | 2021-04-26 23:56:15 | [diff] [blame] | 380 | if ((is_mac || is_ios) && !is_component_build) { |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 381 | ldflags = [ |
| 382 | "-install_name", |
| 383 | "@rpath/libangle_util.dylib", |
| 384 | ] |
| 385 | } |
| 386 | |
| 387 | # Currently excluded from the static build because of build issues. |
| 388 | # Would be nice if could be included. |
| 389 | if (is_win && !angle_is_winuwp) { |
| 390 | sources += [ "windows/WGLWindow.cpp" ] |
| 391 | } |
| 392 | } else { |
| 393 | public_configs += [ |
Jamie Madill | aaee3c2 | 2022-11-30 19:24:13 | [diff] [blame] | 394 | "$angle_root:angle_static_config", |
Jamie Madill | 683dd1d | 2020-01-13 22:21:52 | [diff] [blame] | 395 | "$angle_root:gl_prototypes", |
| 396 | ] |
| 397 | } |
| 398 | } |
| 399 | } |
| 400 | |
Jamie Madill | 9190f49 | 2019-12-16 21:03:57 | [diff] [blame] | 401 | if (is_win && !angle_is_winuwp) { |
| 402 | angle_source_set("angle_stack_walker") { |
| 403 | sources = [ |
| 404 | "windows/third_party/StackWalker/src/StackWalker.cpp", |
| 405 | "windows/third_party/StackWalker/src/StackWalker.h", |
| 406 | ] |
| 407 | |
| 408 | if (is_clang) { |
| 409 | cflags_cc = [ |
| 410 | "-Wno-c++98-compat-extra-semi", |
| 411 | "-Wno-missing-declarations", |
| 412 | "-Wno-switch", |
| 413 | ] |
| 414 | } else { |
| 415 | cflags_cc = [ "/wd4740" ] |
| 416 | } |
| 417 | } |
| 418 | } |
| 419 | |
Jamie Madill | d08f1d8 | 2020-05-05 16:54:07 | [diff] [blame] | 420 | config("angle_png_utils_config") { |
| 421 | include_dirs = [ ".." ] |
| 422 | } |
| 423 | |
| 424 | angle_source_set("angle_png_utils") { |
| 425 | deps = [ "$angle_libpng_dir" ] |
| 426 | sources = [ |
| 427 | "png_utils.cpp", |
| 428 | "png_utils.h", |
| 429 | ] |
| 430 | public_configs = [ ":angle_png_utils_config" ] |
| 431 | } |
| 432 | |
Jamie Madill | 9190f49 | 2019-12-16 21:03:57 | [diff] [blame] | 433 | config("angle_test_util_config") { |
| 434 | include_dirs = [ ".." ] |
| 435 | } |
| 436 | |
| 437 | angle_source_set("angle_test_utils") { |
| 438 | public_configs = [ ":angle_test_util_config" ] |
Antonio Caggiano | 9ad43bd | 2021-12-09 15:52:35 | [diff] [blame] | 439 | |
Jamie Madill | 6ca2c11 | 2020-07-17 17:07:24 | [diff] [blame] | 440 | public_deps = [ "$angle_root:angle_common" ] |
Antonio Caggiano | 9ad43bd | 2021-12-09 15:52:35 | [diff] [blame] | 441 | if (angle_use_wayland) { |
| 442 | public_deps += [ "$angle_root:angle_wayland" ] |
| 443 | } |
| 444 | |
Jamie Madill | 6ca2c11 | 2020-07-17 17:07:24 | [diff] [blame] | 445 | deps = [] |
Jamie Madill | 9190f49 | 2019-12-16 21:03:57 | [diff] [blame] | 446 | sources = [ |
| 447 | "Timer.cpp", |
| 448 | "Timer.h", |
| 449 | "test_utils.cpp", |
| 450 | "test_utils.h", |
| 451 | ] |
| 452 | |
| 453 | if (is_win) { |
Jamie Madill | 5eadaf8 | 2020-01-13 22:21:53 | [diff] [blame] | 454 | sources += [ "windows/test_utils_win.cpp" ] |
| 455 | if (angle_is_winuwp) { |
| 456 | sources += [ "windows/test_utils_winuwp.cpp" ] |
| 457 | } else { |
Jamie Madill | 9190f49 | 2019-12-16 21:03:57 | [diff] [blame] | 458 | deps += [ ":angle_stack_walker" ] |
Jamie Madill | 5eadaf8 | 2020-01-13 22:21:53 | [diff] [blame] | 459 | sources += [ "windows/win32/test_utils_win32.cpp" ] |
Jamie Madill | 9190f49 | 2019-12-16 21:03:57 | [diff] [blame] | 460 | } |
| 461 | } else { |
| 462 | sources += [ |
| 463 | "posix/crash_handler_posix.cpp", |
| 464 | "posix/test_utils_posix.cpp", |
| 465 | ] |
| 466 | } |
| 467 | } |