Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / build / config / ui.gni
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 # This file contains UI-related build flags. It should theoretically be in the
6 # src/ui directory and only things that depend on the ui module should get the
7 # definitions.
8 #
9 # However, today we have many "bad" dependencies on some of these flags from,
10 # e.g. base, so they need to be global.
11
12 declare_args() {
13   # True means the UI is built useing the "views" framework.
14   toolkit_views = false
15
16   # Indicates if Ash is enabled. Ash is the Aura SHell which provides a
17   # desktop-like environment for Aura. Requires use_aura = true
18   use_ash = false
19
20   # Indicates if Aura is enabled. Aura is a low-level windowing library, sort
21   # of a replacement for GDI or GTK.
22   use_aura = false
23
24   # Indicates if Ozone is enabled. Ozone is a low-level library layer for Linux
25   # that does not require X11.
26   use_ozone = false
27 }
28
29 if (is_win || is_chromeos) {
30   # Windows currelty implies Aura.
31   # TODO(brettw) bug 342937 move to declare_args block.
32   use_ash = true
33   use_aura = true
34 }
35
36 if (is_linux || use_ozone) {
37   use_aura = true
38 }
39
40 if (!use_aura) {
41   use_ash = false  # Ash needs Aura.
42 }
43
44 # TODO(brettw) bug 342937 move this to the declare_args block above when this
45 # is supported. It would look like:
46 #  toolkit_views = is_win || is_chromeos || use_aura
47 if (is_win || is_chromeos || use_aura) {
48   toolkit_views = true
49 }
50
51 # Additional dependent variables -----------------------------------------------
52 #
53 # These variables depend on other variables and can't be set externally.
54
55 # Indicates if the UI toolkit depends on GTK.
56 toolkit_uses_gtk = is_linux && !is_chromeos && !use_aura && !use_ozone
57
58 # Indicates if the UI toolkit depends on X11.
59 use_x11 = is_linux && !use_ozone
60
61 use_glib = is_linux