1# Copyright 2018 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4import("//build/config/cast.gni") 5import("//build/config/chromeos/args.gni") 6import("//build/config/linux/pkg_config.gni") 7 8assert(is_linux || is_chromeos) 9 10declare_args() { 11 # Controls whether the build should use the version of libdrm library shipped 12 # with the system. In release builds of desktop Linux and Chrome OS we use the 13 # system version. Some Chromecast devices use this as well. 14 use_system_libdrm = is_chromeos_device || (is_linux && !is_castos) 15} 16 17if (use_system_libdrm) { 18 pkg_config("libdrm_config") { 19 packages = [ "libdrm" ] 20 } 21 group("libdrm") { 22 public_configs = [ ":libdrm_config" ] 23 } 24} else { 25 group("libdrm") { 26 public_deps = [ "//third_party/libdrm" ] 27 } 28 config("libdrm_exynos_include_config") { 29 include_dirs = [ "//third_party/libdrm/src/exynos" ] 30 } 31} 32