Commit a000b9f2 authored by Antonio Caggiano's avatar Antonio Caggiano
Browse files

GN: Wayland build overrides

Introduce //build_overrides/wayland.gni to simplify the management of
the wayland dependencies.

Bug: chromium:1327041, angleproject:7409
Change-Id: I24cd7c0aa1025acbfe681afb07ccb384ff52bb62
parent 48b928d9
......@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/wayland.gni")
# import the ozone_platform_x11 variable
import("gni/angle.gni")
if (angle_enable_vulkan) {
......@@ -1034,7 +1036,7 @@ angle_source_set("angle_gl_enum_utils") {
if (angle_use_wayland) {
config("angle_wayland_config") {
if (!defined(use_system_libwayland) || use_system_libwayland) {
if (use_system_libwayland) {
libs = [
"wayland-client",
"wayland-egl",
......@@ -1042,23 +1044,19 @@ if (angle_use_wayland) {
}
include_dirs = [
"$angle_wayland_dir/egl",
"$angle_wayland_dir/src",
# In case we are building with chromium, we need to take into account the case
# where wayland-egl-backend.h is not installed in the system include directories
"//third_party/wayland/src/egl",
"$wayland_dir/egl",
"$wayland_dir/src",
]
}
group("angle_wayland") {
public_configs = [ ":angle_wayland_config" ]
if (defined(use_system_libwayland) && !use_system_libwayland) {
# Use chromium third-party targets
if (!use_system_libwayland) {
# Use third-party targets
public_deps = [
"//third_party/wayland:wayland_client",
"//third_party/wayland:wayland_egl",
"$wayland_gn_dir:wayland_client",
"$wayland_gn_dir:wayland_egl",
]
}
}
......
# Copyright 2022 The ANGLE Project 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("//gni/angle.gni")
# Path to Wayland sources
wayland_dir = angle_wayland_dir
# ANGLE standalone has no Wayland GN
wayland_gn_dir = ""
use_system_libwayland = true
......@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build_overrides/swiftshader.gni")
import("//build_overrides/wayland.gni")
import("../../../gni/angle.gni")
declare_args() {
......@@ -30,7 +31,7 @@ if (angle_enable_vulkan || angle_build_vulkan_system_info) {
defines = [ "ANGLE_SHARED_LIBVULKAN=1" ]
}
if (angle_use_wayland) {
include_dirs = [ "$angle_wayland_dir/src" ]
include_dirs = [ "$wayland_dir/src" ]
}
configs = [ "$angle_root:angle_vulkan_wayland_config" ]
}
......
......@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/wayland.gni")
import("../../../gni/angle.gni")
config("volk_config") {
......@@ -17,6 +18,6 @@ source_set("volk") {
configs += [ "$angle_root:angle_no_cfi_icall" ]
public_deps = [ "$angle_vulkan_headers_dir:vulkan_headers" ]
if (angle_use_wayland) {
include_dirs = [ "$angle_wayland_dir/src" ]
include_dirs = [ "$wayland_dir/src" ]
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment