| OLD | NEW |
| (Empty) | |
| 1 # Copyright 2016 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 import("//build/config/linux/pkg_config.gni") |
| 5 |
| 6 assert(is_linux) |
| 7 |
| 8 declare_args() { |
| 9 # Controls whether the build should use the version of libdrm |
| 10 # library shipped with the system. In release builds of Chrome OS we |
| 11 # use the system version, but when building on dev workstations we |
| 12 # bundle it because Ubuntu doesn't ship a usable version. |
| 13 use_system_libdrm = true |
| 14 } |
| 15 |
| 16 if (!use_system_libdrm) { |
| 17 config("libdrm_config") { |
| 18 include_dirs = [ |
| 19 "src", |
| 20 "src/include", |
| 21 "src/include/drm", |
| 22 ] |
| 23 if (is_clang) { |
| 24 cflags = [ "-Wno-enum-conversion" ] |
| 25 } |
| 26 } |
| 27 |
| 28 static_library("libdrm") { |
| 29 sources = [ |
| 30 "src/xf86drm.c", |
| 31 "src/xf86drmHash.c", |
| 32 "src/xf86drmMode.c", |
| 33 "src/xf86drmRandom.c", |
| 34 ] |
| 35 |
| 36 include_dirs = [ |
| 37 "src", |
| 38 "src/include", |
| 39 ] |
| 40 configs -= [ "//build/config/compiler:chromium_code" ] |
| 41 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 42 |
| 43 public_configs = [ ":libdrm_config" ] |
| 44 } |
| 45 } |
| 46 |
| 47 if (use_system_libdrm) { |
| 48 pkg_config("libdrm_config") { |
| 49 packages = [ "libdrm" ] |
| 50 } |
| 51 group("libdrm") { |
| 52 public_configs = [ ":libdrm_config" ] |
| 53 } |
| 54 } |
| OLD | NEW |