GN: Fix wayland import check

Gate the import of wayland/features.gni behind ozone_platform_wayland.

Bug: chromium:1327041
Reported-by: Austin Eng <enga@google.com>
Change-Id: Iba03e19f80d1302f16837b30c11955e168fb13cc
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/66348
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Presubmit-Ready: Alexis Hétu <sugoi@google.com>
Commit-Queue: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
diff --git a/src/WSI/BUILD.gn b/src/WSI/BUILD.gn
index 03df427..243729b 100644
--- a/src/WSI/BUILD.gn
+++ b/src/WSI/BUILD.gn
@@ -13,8 +13,12 @@
 # limitations under the License.
 
 import("../swiftshader.gni")
+
 if (is_linux) {
-  import("//third_party/wayland/features.gni")
+  import("//build/config/ozone.gni")
+  if (ozone_platform_wayland) {
+    import("//third_party/wayland/features.gni")
+  }
 }
 
 config("WSI_metal_weak_framework") {