Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Unified Diff: third_party/libdrm/BUILD.gn

Issue 2594483002: third_party: Add libdrm. (Closed)
Patch Set: Add libdrm deps to gbm_unittests. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | third_party/libdrm/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libdrm/BUILD.gn
diff --git a/third_party/libdrm/BUILD.gn b/third_party/libdrm/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..8e2b518aa61ba0db7a78ed2edf01bb8260e9ad52
--- /dev/null
+++ b/third_party/libdrm/BUILD.gn
@@ -0,0 +1,54 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+import("//build/config/linux/pkg_config.gni")
+
+assert(is_linux)
+
+declare_args() {
+ # Controls whether the build should use the version of libdrm
+ # library shipped with the system. In release builds of Chrome OS we
+ # use the system version, but when building on dev workstations we
+ # bundle it because Ubuntu doesn't ship a usable version.
+ use_system_libdrm = true
+}
+
+if (!use_system_libdrm) {
+ config("libdrm_config") {
+ include_dirs = [
+ "src",
+ "src/include",
+ "src/include/drm",
+ ]
+ if (is_clang) {
+ cflags = [ "-Wno-enum-conversion" ]
+ }
+ }
+
+ static_library("libdrm") {
+ sources = [
+ "src/xf86drm.c",
+ "src/xf86drmHash.c",
+ "src/xf86drmMode.c",
+ "src/xf86drmRandom.c",
+ ]
+
+ include_dirs = [
+ "src",
+ "src/include",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ public_configs = [ ":libdrm_config" ]
+ }
+}
+
+if (use_system_libdrm) {
+ pkg_config("libdrm_config") {
+ packages = [ "libdrm" ]
+ }
+ group("libdrm") {
+ public_configs = [ ":libdrm_config" ]
+ }
+}
« no previous file with comments | « DEPS ('k') | third_party/libdrm/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698