# Copyright 2015 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/linux/pkg_config.gni") import("//build/config/ui.gni") import("//ui/base/ui_features.gni") import("//ui/ozone/ozone.gni") if (use_xkbcommon) { pkg_config("xkbcommon") { packages = [ "xkbcommon" ] } } if (use_ozone) { pkg_config("libdrm") { packages = [ "libdrm" ] } } source_set("wayland") { sources = [ "scoped_wl.cc", "scoped_wl.h", "server.cc", "server.h", ] defines = [ "EXO_IMPLEMENTATION" ] deps = [ "//ash", "//ash/public/cpp:ash_public_cpp", "//base", "//components/exo", "//device/gamepad", "//skia", "//third_party/wayland:wayland_server", "//third_party/wayland-protocols:alpha_compositing_protocol", "//third_party/wayland-protocols:gaming_input_protocol", "//third_party/wayland-protocols:keyboard_configuration_protocol", "//third_party/wayland-protocols:presentation_time_protocol", "//third_party/wayland-protocols:remote_shell_protocol", "//third_party/wayland-protocols:secure_output_protocol", "//third_party/wayland-protocols:stylus_protocol", "//third_party/wayland-protocols:stylus_tools_protocol", "//third_party/wayland-protocols:viewporter_protocol", "//third_party/wayland-protocols:vsync_feedback_protocol", "//third_party/wayland-protocols:xdg_shell_protocol", "//ui/aura", "//ui/base", "//ui/display/manager", "//ui/events:dom_keycode_converter", "//ui/events:events_base", "//ui/views", "//ui/wm:wm", ] if (use_ozone) { deps += [ "//third_party/mesa:wayland_drm_protocol", "//third_party/wayland-protocols:linux_dmabuf_protocol", ] configs += [ ":libdrm" ] } if (use_xkbcommon) { configs += [ ":xkbcommon" ] deps += [ "//ui/events/keycodes:xkb" ] } } source_set("unit_tests") { testonly = true sources = [ "server_unittest.cc", ] deps = [ ":wayland", "//base", "//components/exo", "//testing/gtest", "//third_party/wayland:wayland_client", ] } source_set("client_lib") { sources = [ "clients/client_base.cc", "clients/client_base.h", "clients/client_helper.cc", "clients/client_helper.h", ] deps = [ "//base", "//skia", "//third_party/wayland:wayland_client", "//third_party/wayland-protocols:linux_dmabuf_protocol", "//third_party/wayland-protocols:presentation_time_protocol", "//ui/gl", "//ui/gl/init", ] if (ozone_platform_gbm) { configs += [ ":libdrm", "//ui/gl:gl_config", ] defines = [ "OZONE_PLATFORM_GBM" ] deps += [ "//third_party/minigbm", "//ui/ozone", ] } } executable("wayland_rects_client") { sources = [ "clients/rects.cc", ] deps = [ ":client_lib", "//base", "//skia", "//third_party/wayland:wayland_client", "//third_party/wayland-protocols:linux_dmabuf_protocol", "//third_party/wayland-protocols:presentation_time_protocol", "//ui/gfx/geometry", "//ui/gl", ] if (ozone_platform_gbm) { configs += [ ":libdrm", "//ui/gl:gl_config", ] defines = [ "OZONE_PLATFORM_GBM" ] deps += [ "//third_party/minigbm" ] } } executable("wayland_simple_client") { sources = [ "clients/simple.cc", ] deps = [ ":client_lib", "//base", "//skia", "//third_party/wayland:wayland_client", "//third_party/wayland-protocols:linux_dmabuf_protocol", "//third_party/wayland-protocols:presentation_time_protocol", "//ui/gfx/geometry", "//ui/gl", ] if (ozone_platform_gbm) { configs += [ ":libdrm", "//ui/gl:gl_config", ] defines = [ "OZONE_PLATFORM_GBM" ] deps += [ "//third_party/minigbm" ] } } if (ozone_platform_gbm) { executable("wayland_yuv_client") { sources = [ "clients/yuv.cc", ] deps = [ ":client_lib", "//base", "//skia", "//third_party/wayland:wayland_client", "//third_party/wayland-protocols:linux_dmabuf_protocol", "//third_party/wayland-protocols:presentation_time_protocol", "//ui/gfx/geometry", ] configs += [ ":libdrm", "//ui/gl:gl_config", ] defines = [ "OZONE_PLATFORM_GBM" ] deps += [ "//third_party/minigbm" ] } }