Avoid inadvertently adding a wayland dependency
This BUILD.gn adds libWaylandClient.[cpp,h] to the sources on linux
when using the ozone wayland backend, but adds a dependency on
libwayland-client regardless of the ozone backend.
This patch avoids adding the dependency when not building the
wayland ozone backend.
This fixes #177 (https://bugs.chromium.org/p/swiftshader/issues/detail?id=177)
Change-Id: Ia1d58d200d1059e9737933431b3f9334ca545653
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/68489
Commit-Queue: Alexis Hétu <sugoi@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
diff --git a/src/WSI/BUILD.gn b/src/WSI/BUILD.gn
index 4709332..c53a1c9 100644
--- a/src/WSI/BUILD.gn
+++ b/src/WSI/BUILD.gn
@@ -87,7 +87,7 @@
"../Vulkan:swiftshader_libvulkan_headers",
]
- if (is_linux && !use_system_libwayland) {
+ if (is_linux && ozone_platform_wayland && !use_system_libwayland) {
# Use third-party targets
deps += [ "$wayland_gn_dir:wayland_client" ]
}