summaryrefslogtreecommitdiff
path: root/www/iridium/files/patch-third__party_angle_BUILD.gn
blob: 461ff42a959e2789b674fc845d3b6bbbcea5ff23 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
--- third_party/angle/BUILD.gn.orig	2017-04-19 19:07:43 UTC
+++ third_party/angle/BUILD.gn
@@ -16,6 +16,12 @@ if (ozone_platform_gbm) {
   }
 }
 
+if (use_x11) {
+  pkg_config("x11") {
+    packages = [ "x11", "xi", "xext" ]
+  }
+}
+
 angle_git_is_present = exec_script("src/commit_id.py",
                                    [
                                      "check",
@@ -418,11 +424,7 @@ static_library("libANGLE") {
     if (use_x11) {
       sources += rebase_path(gles_gypi.libangle_gl_glx_sources, ".", "src")
       deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ]
-      libs += [
-        "X11",
-        "Xi",
-        "Xext",
-      ]
+      configs += [ ":x11" ]
     }
     if (is_mac) {
       sources += rebase_path(gles_gypi.libangle_gl_cgl_sources, ".", "src")
@@ -627,7 +629,7 @@ util_gypi = exec_script("//build/gypi_to
 
 config("angle_util_config") {
   include_dirs = [ "util" ]
-  if (is_linux && use_x11) {
+  if ((is_linux || is_bsd) && use_x11) {
     libs = [ "X11" ]
   }
 }
@@ -654,7 +656,7 @@ foreach(is_shared_library,
       sources += rebase_path(util_gypi.util_win32_sources, ".", "util")
     }
 
-    if (is_linux) {
+    if (is_linux && !is_bsd) {
       sources += rebase_path(util_gypi.util_linux_sources, ".", "util")
       libs = [
         "rt",