| # 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") |
| import("//testing/test.gni") |
| |
| declare_args() { |
| # Enable experimental vulkan wayland client. |
| enable_vulkan_wayland_client = false |
| } |
| |
| if (use_xkbcommon) { |
| pkg_config("xkbcommon") { |
| packages = [ "xkbcommon" ] |
| } |
| } |
| |
| if (use_ozone) { |
| if (enable_vulkan_wayland_client) { |
| pkg_config("vulkan") { |
| packages = [ "vulkan" ] |
| } |
| } |
| } |
| |
| source_set("wayland") { |
| sources = [ |
| "scoped_wl.cc", |
| "scoped_wl.h", |
| "server.cc", |
| "server.h", |
| "server_util.cc", |
| "server_util.h", |
| "wayland_input_delegate.cc", |
| "wayland_input_delegate.h", |
| "wayland_keyboard_delegate.cc", |
| "wayland_keyboard_delegate.h", |
| "wayland_pointer_delegate.cc", |
| "wayland_pointer_delegate.h", |
| "wayland_touch_delegate.cc", |
| "wayland_touch_delegate.h", |
| "wl_seat.cc", |
| "wl_seat.h", |
| "wl_shell.cc", |
| "wl_shell.h", |
| "zcr_cursor_shapes.cc", |
| "zcr_cursor_shapes.h", |
| "zcr_gaming_input.cc", |
| "zcr_gaming_input.h", |
| "zcr_keyboard_configuration.cc", |
| "zcr_keyboard_configuration.h", |
| "zcr_keyboard_extension.cc", |
| "zcr_keyboard_extension.h", |
| "zcr_notification_shell.cc", |
| "zcr_notification_shell.h", |
| "zcr_remote_shell.cc", |
| "zcr_remote_shell.h", |
| "zcr_stylus_tools.cc", |
| "zcr_stylus_tools.h", |
| "zwp_input_timestamps_manager.cc", |
| "zwp_input_timestamps_manager.h", |
| "zwp_text_input_manager.cc", |
| "zwp_text_input_manager.h", |
| "zxdg_shell.cc", |
| "zxdg_shell.h", |
| ] |
| |
| defines = [ "EXO_IMPLEMENTATION" ] |
| |
| deps = [ |
| "//base", |
| "//components/exo", |
| "//components/exo/wayland/public:aura_shell_protocol", |
| "//device/gamepad", |
| "//services/viz/public/interfaces", |
| "//skia", |
| "//third_party/wayland:wayland_server", |
| "//third_party/wayland-protocols:alpha_compositing_protocol", |
| "//third_party/wayland-protocols:cursor_shapes_protocol", |
| "//third_party/wayland-protocols:gaming_input_protocol", |
| "//third_party/wayland-protocols:input_timestamps_protocol", |
| "//third_party/wayland-protocols:keyboard_configuration_protocol", |
| "//third_party/wayland-protocols:keyboard_extension_protocol", |
| "//third_party/wayland-protocols:notification_shell_protocol", |
| "//third_party/wayland-protocols:pointer_gestures_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:text_input_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", |
| "//ui/wm/public", |
| ] |
| |
| if (use_ozone) { |
| deps += [ |
| "//build/config/linux/libdrm", |
| "//third_party/wayland-protocols:linux_dmabuf_protocol", |
| ] |
| |
| if (is_chromeos) { |
| deps += [ |
| "//ash/public/cpp", |
| "//ui/events/ozone:events_ozone_layout", |
| ] |
| } |
| } |
| |
| if (use_xkbcommon) { |
| configs += [ ":xkbcommon" ] |
| deps += [ "//ui/events/keycodes:xkb" ] |
| } |
| |
| if (is_chromecast) { |
| defines += [ "USE_FULLSCREEN_SHELL" ] |
| sources += [ |
| "zwp_fullscreen_shell.cc", |
| "zwp_fullscreen_shell.h", |
| ] |
| deps += [ "//third_party/wayland-protocols:fullscreen_shell_protocol" ] |
| } |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| |
| sources = [ |
| "server_unittest.cc", |
| ] |
| |
| deps = [ |
| ":wayland", |
| "//base", |
| "//components/exo", |
| "//components/exo:test_support", |
| "//skia", |
| "//testing/gtest", |
| "//third_party/wayland:wayland_client", |
| ] |
| } |
| |
| config("client_support_config") { |
| if (ozone_platform_gbm) { |
| defines = [ "USE_GBM" ] |
| if (enable_vulkan_wayland_client) { |
| defines += [ "USE_VULKAN" ] |
| } |
| } |
| } |
| |
| source_set("client_support") { |
| sources = [ |
| "clients/client_base.cc", |
| "clients/client_base.h", |
| "clients/client_helper.cc", |
| "clients/client_helper.h", |
| ] |
| |
| deps = [ |
| "//base", |
| "//components/exo/wayland/public:aura_shell_protocol", |
| "//ui/gl", |
| "//ui/gl/init", |
| ] |
| |
| public_deps = [ |
| "//skia", |
| "//third_party/wayland:wayland_client", |
| "//third_party/wayland-protocols:fullscreen_shell_protocol", |
| "//third_party/wayland-protocols:input_timestamps_protocol", |
| "//third_party/wayland-protocols:linux_dmabuf_protocol", |
| "//third_party/wayland-protocols:presentation_time_protocol", |
| ] |
| |
| if (ozone_platform_gbm) { |
| configs += [ "//ui/gl:gl_config" ] |
| if (enable_vulkan_wayland_client) { |
| configs += [ ":vulkan" ] |
| } |
| deps += [ |
| "//build/config/linux/libdrm", |
| "//ui/ozone", |
| ] |
| public_deps += [ "//third_party/minigbm" ] |
| } |
| |
| public_configs = [ ":client_support_config" ] |
| } |
| |
| executable("wayland_rects_client") { |
| sources = [ |
| "clients/rects.cc", |
| ] |
| |
| deps = [ |
| ":client_support", |
| "//base", |
| "//skia", |
| "//third_party/wayland:wayland_client", |
| "//third_party/wayland-protocols:input_timestamps_protocol", |
| "//third_party/wayland-protocols:linux_dmabuf_protocol", |
| "//third_party/wayland-protocols:presentation_time_protocol", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| ] |
| |
| if (ozone_platform_gbm) { |
| configs += [ "//ui/gl:gl_config" ] |
| defines = [ "USE_GBM" ] |
| deps += [ |
| "//build/config/linux/libdrm", |
| "//third_party/minigbm", |
| ] |
| } |
| } |
| |
| source_set("simple") { |
| sources = [ |
| "clients/simple.cc", |
| "clients/simple.h", |
| ] |
| |
| deps = [ |
| ":client_support", |
| "//base", |
| "//build/config/linux/libdrm", |
| "//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 += [ "//ui/gl:gl_config" ] |
| } |
| } |
| |
| source_set("fullscreen_shell") { |
| sources = [ |
| "clients/fullscreen_shell.cc", |
| "clients/fullscreen_shell.h", |
| ] |
| |
| deps = [ |
| ":client_support", |
| "//base", |
| "//build/config/linux/libdrm", |
| "//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 += [ "//ui/gl:gl_config" ] |
| } |
| } |
| |
| executable("wayland_simple_client") { |
| sources = [ |
| "clients/simple_main.cc", |
| ] |
| deps = [ |
| ":client_support", |
| ":simple", |
| "//base", |
| ] |
| } |
| |
| executable("wayland_fullscreen_client") { |
| sources = [ |
| "clients/fullscreen_shell_main.cc", |
| ] |
| deps = [ |
| ":client_support", |
| ":fullscreen_shell", |
| "//base", |
| ] |
| } |
| |
| executable("wayland_subsurface_client") { |
| sources = [ |
| "clients/subsurface.cc", |
| ] |
| |
| deps = [ |
| ":client_support", |
| "//base", |
| "//build/config/linux/libdrm", |
| "//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 += [ "//ui/gl:gl_config" ] |
| } |
| } |
| |
| source_set("blur") { |
| sources = [ |
| "clients/blur.cc", |
| "clients/blur.h", |
| ] |
| |
| deps = [ |
| ":client_support", |
| "//base", |
| "//build/config/linux/libdrm", |
| "//skia", |
| "//third_party/wayland:wayland_client", |
| "//ui/gfx/geometry", |
| "//ui/gl", |
| ] |
| |
| if (ozone_platform_gbm) { |
| configs += [ "//ui/gl:gl_config" ] |
| } |
| } |
| |
| executable("wayland_blur_client") { |
| sources = [ |
| "clients/blur_main.cc", |
| ] |
| deps = [ |
| ":blur", |
| ":client_support", |
| "//base", |
| ] |
| } |
| |
| executable("wayland_info_client") { |
| sources = [ |
| "clients/info.cc", |
| ] |
| |
| deps = [ |
| ":client_support", |
| "//base", |
| "//third_party/wayland:wayland_client", |
| "//ui/gfx/geometry", |
| ] |
| } |
| |
| test("wayland_client_perftests") { |
| sources = [ |
| "clients/perftests.cc", |
| "clients/test/run_all_client_perftests.cc", |
| "clients/test/wayland_client_test.cc", |
| "clients/test/wayland_client_test.h", |
| ] |
| |
| deps = [ |
| ":blur", |
| ":client_support", |
| ":simple", |
| ":wayland", |
| "//base", |
| "//base/test:test_support", |
| "//cc:test_support", |
| "//components/exo", |
| "//components/viz/test:test_support", |
| "//mojo/core/embedder", |
| "//testing/perf", |
| "//ui/aura", |
| "//ui/aura:test_support", |
| "//ui/base", |
| "//ui/compositor:test_support", |
| "//ui/events:gesture_detection", |
| "//ui/gl:test_support", |
| "//ui/wm", |
| ] |
| |
| data_deps = [] |
| |
| if (is_chromeos) { |
| sources += [ |
| "../../../ash/test/ash_test_suite.cc", |
| "../../../ash/test/ash_test_suite.h", |
| ] |
| |
| data_deps += [ |
| "//ash/strings:ash_test_strings", |
| "//ash/resources:ash_test_resources_100_percent", |
| "//ash/resources:ash_test_resources_200_percent", |
| ] |
| |
| deps += [ |
| "//ash", |
| "//ash:test_support_without_content", |
| "//ash/public/cpp", |
| ] |
| } |
| } |
| |
| if (ozone_platform_gbm) { |
| executable("wayland_yuv_client") { |
| sources = [ |
| "clients/yuv.cc", |
| ] |
| |
| deps = [ |
| ":client_support", |
| "//base", |
| "//build/config/linux/libdrm", |
| "//skia", |
| "//third_party/wayland:wayland_client", |
| "//third_party/wayland-protocols:linux_dmabuf_protocol", |
| "//third_party/wayland-protocols:presentation_time_protocol", |
| "//ui/gfx/geometry", |
| ] |
| |
| configs += [ "//ui/gl:gl_config" ] |
| deps += [ "//third_party/minigbm" ] |
| } |
| if (enable_vulkan_wayland_client) { |
| executable("wayland_vulkan_client") { |
| sources = [ |
| "clients/vulkan.cc", |
| ] |
| |
| deps = [ |
| ":client_support", |
| "//base", |
| "//build/config/linux/libdrm", |
| "//skia", |
| "//third_party/wayland:wayland_client", |
| "//third_party/wayland-protocols:linux_dmabuf_protocol", |
| "//third_party/wayland-protocols:presentation_time_protocol", |
| "//ui/gfx/geometry", |
| ] |
| |
| configs += [ "//ui/gl:gl_config" ] |
| deps += [ "//third_party/minigbm" ] |
| } |
| } |
| } |