summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 23:23:21 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 23:23:21 +0000
commit3c0b199de26ed495312901fa56567d0ff9a21ed5 (patch)
tree0d4d8f22c636056558b0785d717ac7714eb7abf8
parent1f584fe2cd4cea2b8f68c0884c0def90d84a69ec (diff)
downloadchromium_src-3c0b199de26ed495312901fa56567d0ff9a21ed5.zip
chromium_src-3c0b199de26ed495312901fa56567d0ff9a21ed5.tar.gz
chromium_src-3c0b199de26ed495312901fa56567d0ff9a21ed5.tar.bz2
x11: Include X11 dependencies only when building with X11.
BUG=none Review URL: https://codereview.chromium.org/12563002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186816 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/base.gyp10
-rw-r--r--build/linux/system.gyp2
-rw-r--r--content/browser/renderer_host/media/video_capture_manager.cc3
-rw-r--r--content/content_browser.gypi6
-rw-r--r--content/content_plugin.gypi2
-rw-r--r--media/media.gyp24
-rw-r--r--remoting/remoting.gyp4
-rw-r--r--ui/aura/aura.gyp2
-rw-r--r--ui/ui.gyp24
9 files changed, 47 insertions, 30 deletions
diff --git a/base/base.gyp b/base/base.gyp
index 1355944..0b08c90 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -62,7 +62,6 @@
'dependencies': [
'symbolize',
'../build/linux/system.gyp:glib',
- '../build/linux/system.gyp:x11',
'xdg_mime',
],
'defines': [
@@ -73,7 +72,6 @@
],
'export_dependent_settings': [
'../build/linux/system.gyp:glib',
- '../build/linux/system.gyp:x11',
],
}, { # use_glib!=1
'sources/': [
@@ -81,6 +79,14 @@
['exclude', '_nss\\.cc$'],
],
}],
+ ['use_x11==1', {
+ 'dependencies': [
+ '../build/linux/system.gyp:x11',
+ ],
+ 'export_dependent_settings': [
+ '../build/linux/system.gyp:x11',
+ ],
+ }],
['OS == "android" and _toolset == "host"', {
# Base for host support is the minimum required to run the
# ssl false start blacklist tool. It requires further changes
diff --git a/build/linux/system.gyp b/build/linux/system.gyp
index 4b3ab39..d9e553d 100644
--- a/build/linux/system.gyp
+++ b/build/linux/system.gyp
@@ -748,7 +748,7 @@
],
},
}],
- ['chromeos==1', {
+ ['use_x11==1', {
'link_settings': {
'libraries': [ '-lXtst' ]
}
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
index a2d3c69..837712d 100644
--- a/content/browser/renderer_host/media/video_capture_manager.cc
+++ b/content/browser/renderer_host/media/video_capture_manager.cc
@@ -178,7 +178,8 @@ void VideoCaptureManager::OnOpen(int capture_session_id,
break;
}
case MEDIA_SCREEN_VIDEO_CAPTURE: {
-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
+#if (defined(OS_LINUX) && defined(USE_X11)) || \
+ defined(OS_MACOSX) || defined(OS_WIN)
CHECK(CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableUserMediaScreenCapturing));
scoped_refptr<base::SequencedWorkerPool> blocking_pool =
diff --git a/content/content_browser.gypi b/content/content_browser.gypi
index 5e35c91..846f972 100644
--- a/content/content_browser.gypi
+++ b/content/content_browser.gypi
@@ -1098,10 +1098,14 @@
'dependencies': [
'../build/linux/system.gyp:dbus',
'../build/linux/system.gyp:fontconfig',
- '../build/linux/system.gyp:x11',
'../dbus/dbus.gyp:dbus',
],
}],
+ ['use_x11==1', {
+ 'dependencies': [
+ '../build/linux/system.gyp:x11',
+ ],
+ }],
['OS=="android"', {
'dependencies': [
'../media/media.gyp:media',
diff --git a/content/content_plugin.gypi b/content/content_plugin.gypi
index 27dd243..be59c1f2 100644
--- a/content/content_plugin.gypi
+++ b/content/content_plugin.gypi
@@ -56,7 +56,7 @@
],
},
}],
- ['use_aura==1 and OS!="win"', {
+ ['use_x11 == 1', {
'link_settings': {
'libraries': [
'-lXext',
diff --git a/media/media.gyp b/media/media.gyp
index 4af2976..04e7ae4 100644
--- a/media/media.gyp
+++ b/media/media.gyp
@@ -19,8 +19,8 @@
'media_use_ffmpeg%': 1,
'media_use_libvpx%': 1,
}],
- # Screen capturer works only on Windows, OSX and Linux.
- ['OS=="win" or OS=="mac" or OS=="linux"', {
+ # Screen capturer works only on Windows, OSX and Linux (with X11).
+ ['OS=="win" or OS=="mac" or (OS=="linux" and use_x11==1)', {
'screen_capture_supported%': 1,
}, {
'screen_capture_supported%': 0,
@@ -595,15 +595,17 @@
}],
],
},
- 'link_settings': {
- 'libraries': [
- '-lX11',
- '-lXdamage',
- '-lXext',
- '-lXfixes',
- ],
- },
'conditions': [
+ ['use_x11 == 1', {
+ 'link_settings': {
+ 'libraries': [
+ '-lX11',
+ '-lXdamage',
+ '-lXext',
+ '-lXfixes',
+ ],
+ },
+ }],
['use_cras == 1', {
'cflags': [
'<!@(<(pkg-config) --cflags libcras)',
@@ -1345,7 +1347,7 @@
},
],
}],
- ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
+ ['use_x11 == 1', {
'targets': [
{
'target_name': 'player_x11',
diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp
index e1bad8f..712dddd 100644
--- a/remoting/remoting.gyp
+++ b/remoting/remoting.gyp
@@ -55,8 +55,8 @@
'host_plugin_name': '<!(python <(version_py_path) -f <(branding_path) -t "@HOST_PLUGIN_FILE_NAME@")',
'conditions': [
- # Remoting host is supported only on Windows, OSX and Linux.
- ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
+ # Remoting host is supported only on Windows, OSX and Linux (with X11).
+ ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0 and use_x11==1)', {
'enable_remoting_host': 1,
}, {
'enable_remoting_host': 0,
diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp
index aecaf22..883d11c 100644
--- a/ui/aura/aura.gyp
+++ b/ui/aura/aura.gyp
@@ -104,7 +104,7 @@
['exclude', 'client/dispatcher_client.h'],
],
}],
- ['OS=="linux"', {
+ ['use_x11==1', {
'link_settings': {
'libraries': [
'-lX11',
diff --git a/ui/ui.gyp b/ui/ui.gyp
index 5f39852..a8489c4 100644
--- a/ui/ui.gyp
+++ b/ui/ui.gyp
@@ -615,17 +615,7 @@
'../build/linux/system.gyp:fontconfig',
'../build/linux/system.gyp:glib',
'../build/linux/system.gyp:pangocairo',
- '../build/linux/system.gyp:x11',
- '../build/linux/system.gyp:xext',
- '../build/linux/system.gyp:xfixes',
],
- 'link_settings': {
- 'libraries': [
- '-lXcursor', # For XCursor* function calls in x11_util.cc.
- '-lXrender', # For XRender* function calls in x11_util.cc.
- '-lXrandr', # For XRR* function calls in x11_util.cc.
- ],
- },
'conditions': [
['toolkit_views==0', {
# Note: because of gyp predence rules this has to be defined as
@@ -769,9 +759,23 @@
'-lX11',
'-lXcursor',
'-lXrandr', # For XRR* function calls in x11_util.cc.
+ '-lXrender', # For XRender* function calls in x11_util.cc.
],
},
},
+ 'link_settings': {
+ 'libraries': [
+ '-lX11',
+ '-lXcursor',
+ '-lXrandr', # For XRR* function calls in x11_util.cc.
+ '-lXrender', # For XRender* function calls in x11_util.cc.
+ ],
+ },
+ 'dependencies': [
+ '../build/linux/system.gyp:x11',
+ '../build/linux/system.gyp:xext',
+ '../build/linux/system.gyp:xfixes',
+ ],
}, { # use_x11==0
'sources/': [
['exclude', 'base/keycodes/keyboard_code_conversion_x.*'],