| 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") { | |
| 23 packages = [ "libdrm" ] | |
| 24 } | |
| 25 | |
| 26 shared_library("minigbm") { | 22 shared_library("minigbm") { |
| 27 sources = [ | 23 sources = [ |
| 28 "src/amdgpu.c", | 24 "src/amdgpu.c", |
| 29 "src/cirrus.c", | 25 "src/cirrus.c", |
| 30 "src/drv.c", | 26 "src/drv.c", |
| 31 "src/evdi.c", | 27 "src/evdi.c", |
| 32 "src/exynos.c", | 28 "src/exynos.c", |
| 33 "src/gbm.c", | 29 "src/gbm.c", |
| 34 "src/gbm_helpers.c", | 30 "src/gbm_helpers.c", |
| 35 "src/gma500.c", | 31 "src/gma500.c", |
| 36 "src/helpers.c", | 32 "src/helpers.c", |
| 37 "src/i915.c", | 33 "src/i915.c", |
| 38 "src/marvell.c", | 34 "src/marvell.c", |
| 39 "src/mediatek.c", | 35 "src/mediatek.c", |
| 40 "src/rockchip.c", | 36 "src/rockchip.c", |
| 41 "src/tegra.c", | 37 "src/tegra.c", |
| 42 "src/udl.c", | 38 "src/udl.c", |
| 43 "src/vgem.c", | 39 "src/vgem.c", |
| 44 "src/virtio_gpu.c", | 40 "src/virtio_gpu.c", |
| 45 ] | 41 ] |
| 46 | 42 |
| 47 configs -= [ "//build/config/compiler:chromium_code" ] | 43 configs -= [ "//build/config/compiler:chromium_code" ] |
| 48 configs += [ | 44 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 49 ":libdrm", | 45 |
| 50 "//build/config/compiler:no_chromium_code", | 46 deps = [ |
| 47 "//third_party/libdrm", |
| 51 ] | 48 ] |
| 52 | |
| 53 public_configs = [ ":minigbm_config" ] | 49 public_configs = [ ":minigbm_config" ] |
| 54 | 50 |
| 55 # Clients need this to pick up the shared library correctly. | 51 # Clients need this to pick up the shared library correctly. |
| 56 all_dependent_configs = | 52 all_dependent_configs = |
| 57 [ "//build/config/gcc:rpath_for_built_shared_libraries" ] | 53 [ "//build/config/gcc:rpath_for_built_shared_libraries" ] |
| 58 } | 54 } |
| 59 } | 55 } |
| 60 | 56 |
| 61 if (use_system_minigbm) { | 57 if (use_system_minigbm) { |
| 62 pkg_config("libgbm") { | 58 pkg_config("libgbm") { |
| 63 packages = [ "gbm" ] | 59 packages = [ "gbm" ] |
| 64 } | 60 } |
| 65 | 61 |
| 66 group("minigbm") { | 62 group("minigbm") { |
| 67 public_configs = [ ":libgbm" ] | 63 public_configs = [ ":libgbm" ] |
| 68 } | 64 } |
| 69 } | 65 } |
| OLD | NEW |