0

GN: Wayland build overrides

Introduce //build_overrides/wayland.gni to simplify the management of
the wayland dependencies in Chromium, ANGLE, and SwiftShader.

Bug: 1327041, angleproject:7409
Change-Id: Ia178f09303c772a5cce5f9c6b93a4ef2a9381102
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3695277
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1013661}
This commit is contained in:
Antonio Caggiano
2022-06-13 21:19:42 +00:00
committed by Chromium LUCI CQ
parent e9c7afe584
commit 3d415c7d0e
4 changed files with 23 additions and 9 deletions

@ -18,3 +18,4 @@ angle_spirv_cross_dir = "//third_party/vulkan-deps/spirv-cross/src"
angle_spirv_headers_dir = "//third_party/vulkan-deps/spirv-headers/src"
angle_spirv_tools_dir = "//third_party/vulkan-deps/spirv-tools/src"
angle_vulkan_memory_allocator_dir = "//third_party/vulkan_memory_allocator"
angle_wayland_dir = "//third_party/wayland/src"

@ -3,19 +3,18 @@
# found in the LICENSE file.
import("//build/config/ozone.gni")
import("//build_overrides/wayland.gni")
vulkan_use_x11 = ozone_platform_x11
if (ozone_platform_wayland) {
vulkan_use_wayland = true
import("//third_party/wayland/features.gni")
if (!use_system_libwayland) {
wayland_dir = "//third_party/wayland"
vulkan_wayland_include_dirs = [
"$wayland_dir/src/src",
"$wayland_dir/include/src",
"$wayland_dir/include/protocol",
"$wayland_gn_dir/src/src",
"$wayland_gn_dir/include/src",
"$wayland_gn_dir/include/protocol",
]
}
}

@ -0,0 +1,17 @@
# Copyright 2022 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/ozone.gni")
wayland_gn_dir = "//third_party/wayland"
if (ozone_platform_wayland) {
# This defines use_system_libwayland
import("$wayland_gn_dir/features.gni")
} else {
use_system_libwayland = false
}
# Path to Wayland sources
wayland_dir = "$wayland_gn_dir/src"

@ -6,13 +6,10 @@ import("//build/buildflag_header.gni")
import("//build/config/dcheck_always_on.gni")
import("//build/config/ozone.gni")
import("//build/config/ui.gni")
import("//build_overrides/wayland.gni")
import("//testing/test.gni")
import("features.gni")
if (ozone_platform_wayland) {
import("//third_party/wayland/features.gni")
}
# Generate a buildflag header for compile-time checking of Vulkan support.
buildflag_header("buildflags") {
header = "buildflags.h"