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 Chrome OS we use the system version. 13 # Some Chromecast devices use this as well. 14 use_system_libdrm = is_chromeos_device 15} 16 17if (use_system_libdrm) { 18 assert(!is_linux, "System libdrm is not supported in linux") 19 pkg_config("libdrm_config") { 20 packages = [ "libdrm" ] 21 } 22 group("libdrm") { 23 public_configs = [ ":libdrm_config" ] 24 } 25} else { 26 group("libdrm") { 27 public_deps = [ "//third_party/libdrm" ] 28 } 29 config("libdrm_exynos_include_config") { 30 include_dirs = [ "//third_party/libdrm/src/exynos" ] 31 } 32} 33