1# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5# =============================================
6#   PLEASE DO NOT ADD MORE FLAGS TO THIS FILE
7# =============================================
8#
9# These flags are effectively global. Your feature flag should go near the
10# code it controls. Most of these items are here now because they control
11# legacy global #defines passed to the compiler (now replaced with generated
12# buildflag headers -- see //build/buildflag_header.gni).
13#
14# These flags are ui-related so should eventually be moved to various places
15# in //ui/*.
16#
17# There is more advice on where to put build flags in the "Build flag" section
18# of //build/config/BUILDCONFIG.gn.
19
20import("//build/config/chromecast_build.gni")
21
22declare_args() {
23  # Indicates if Ash is enabled. Ash is the Aura Shell which provides a
24  # desktop-like environment for Aura. Requires use_aura = true
25  use_ash = is_chromeos && !is_chromecast
26
27  # Indicates if Ozone is enabled. Ozone is a low-level library layer for Linux
28  # that does not require X11. Enabling this feature disables use of glib, x11,
29  # Pango, and Cairo. Default to false on non-Chromecast builds.
30  use_ozone = is_chromeos || (is_chromecast && !is_android)
31
32  # Indicates if Aura is enabled. Aura is a low-level windowing library, sort
33  # of a replacement for GDI or GTK.
34  use_aura = (is_win || is_linux) && !build_with_mozilla
35
36  # Whether we should use glib, a low level C utility library.
37  use_glib = is_linux && !build_with_mozilla
38}
39
40declare_args() {
41  # True means the UI is built using the "views" framework.
42  toolkit_views =
43      (is_mac || is_win || is_chromeos || use_aura) && !is_chromecast
44}
45
46# Additional dependent variables -----------------------------------------------
47#
48# These variables depend on other variables and can't be set externally.
49
50# Indicates if the UI toolkit depends on X11.
51use_x11 = (is_linux || is_bsd) && !use_ozone
52
53# Turn off glib if Ozone is enabled.
54if (use_ozone) {
55  use_glib = false
56}
57
58if (is_linux && !use_ozone && !build_with_mozilla) {
59  use_cairo = true
60  use_pango = true
61} else {
62  use_cairo = false
63  use_pango = false
64}
65
66# Whether to use atk, the Accessibility ToolKit library
67use_atk = is_desktop_linux && use_x11
68# =============================================
69#   PLEASE DO NOT ADD MORE FLAGS TO THIS FILE
70# =============================================
71#
72# See comment at the top.
73