OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/linux/pkg_config.gni") | 5 import("//build/config/linux/pkg_config.gni") |
6 | 6 |
7 assert(is_linux) | 7 assert(is_linux) |
8 | 8 |
9 declare_args() { | 9 declare_args() { |
10 # Controls whether the build should use the version of minigbm library | 10 # Controls whether the build should use the version of minigbm library |
11 # shipped with the system. In release builds of Chrome OS we use the | 11 # shipped with the system. In release builds of Chrome OS we use the |
12 # system version, but when building on dev workstations or the Chrome | 12 # system version, but when building on dev workstations or the Chrome |
13 # waterfall we bundle it because Ubuntu doesn't ship a usable version. | 13 # waterfall we bundle it because Ubuntu doesn't ship a usable version. |
14 use_system_minigbm = false | 14 use_system_minigbm = false |
15 } | 15 } |
16 | 16 |
17 if (!use_system_minigbm) { | 17 if (!use_system_minigbm) { |
18 config("minigbm_config") { | 18 config("minigbm_config") { |
19 include_dirs = [ "src" ] | 19 include_dirs = [ "src" ] |
20 } | 20 } |
21 | 21 |
22 pkg_config("libdrm") { | 22 pkg_config("libdrm") { |
23 packages = [ "libdrm" ] | 23 packages = [ "libdrm" ] |
24 } | 24 } |
25 | 25 |
26 shared_library("minigbm") { | 26 shared_library("minigbm") { |
27 sources = [ | 27 sources = [ |
| 28 "src/amdgpu.c", |
28 "src/cirrus.c", | 29 "src/cirrus.c", |
| 30 "src/drv.c", |
29 "src/evdi.c", | 31 "src/evdi.c", |
30 "src/exynos.c", | 32 "src/exynos.c", |
31 "src/gbm.c", | 33 "src/gbm.c", |
| 34 "src/gbm_helpers.c", |
32 "src/gma500.c", | 35 "src/gma500.c", |
33 "src/helpers.c", | 36 "src/helpers.c", |
34 "src/i915.c", | 37 "src/i915.c", |
35 "src/marvell.c", | 38 "src/marvell.c", |
36 "src/mediatek.c", | 39 "src/mediatek.c", |
37 "src/rockchip.c", | 40 "src/rockchip.c", |
38 "src/tegra.c", | 41 "src/tegra.c", |
39 "src/udl.c", | 42 "src/udl.c", |
| 43 "src/vgem.c", |
40 "src/virtio_gpu.c", | 44 "src/virtio_gpu.c", |
41 ] | 45 ] |
42 | 46 |
43 configs -= [ "//build/config/compiler:chromium_code" ] | 47 configs -= [ "//build/config/compiler:chromium_code" ] |
44 configs += [ | 48 configs += [ |
45 ":libdrm", | 49 ":libdrm", |
46 "//build/config/compiler:no_chromium_code", | 50 "//build/config/compiler:no_chromium_code", |
47 ] | 51 ] |
48 | 52 |
49 public_configs = [ ":minigbm_config" ] | 53 public_configs = [ ":minigbm_config" ] |
50 | 54 |
51 # Clients need this to pick up the shared library correctly. | 55 # Clients need this to pick up the shared library correctly. |
52 all_dependent_configs = | 56 all_dependent_configs = |
53 [ "//build/config/gcc:rpath_for_built_shared_libraries" ] | 57 [ "//build/config/gcc:rpath_for_built_shared_libraries" ] |
54 } | 58 } |
55 } | 59 } |
56 | 60 |
57 if (use_system_minigbm) { | 61 if (use_system_minigbm) { |
58 pkg_config("libgbm") { | 62 pkg_config("libgbm") { |
59 packages = [ "gbm" ] | 63 packages = [ "gbm" ] |
60 } | 64 } |
61 | 65 |
62 group("minigbm") { | 66 group("minigbm") { |
63 public_configs = [ ":libgbm" ] | 67 public_configs = [ ":libgbm" ] |
64 } | 68 } |
65 } | 69 } |
OLD | NEW |