summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkalyan.kondapally@intel.com <kalyan.kondapally@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-19 07:53:43 +0000
committerkalyan.kondapally@intel.com <kalyan.kondapally@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-19 07:53:43 +0000
commit703df8786f157335c40ac407f7f8372d28e67791 (patch)
treee2a7244f0376c88429156a0c09cce328971b849a
parent1554e827cba484a0221dcf9a8a2302c64e2b225d (diff)
downloadchromium_src-703df8786f157335c40ac407f7f8372d28e67791.zip
chromium_src-703df8786f157335c40ac407f7f8372d28e67791.tar.gz
chromium_src-703df8786f157335c40ac407f7f8372d28e67791.tar.bz2
Hide X11 dependencies when use_x11=0.
When using a non X11 build with Ozone, we still have dependencies on X11. This patch tries to hide X11 and related dependencies when use_x11=0 Review URL: https://codereview.chromium.org/148643002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251981 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/linux/system.gyp493
-rw-r--r--chrome/chrome_browser.gypi7
-rw-r--r--chrome/chrome_browser_extensions.gypi21
-rw-r--r--chrome/chrome_browser_ui.gypi7
-rw-r--r--chrome/chrome_exe.gypi9
-rw-r--r--gpu/tools/tools.gyp2
-rw-r--r--media/cast/cast.gyp2
-rw-r--r--tools/android/forwarder2/forwarder.gyp5
8 files changed, 287 insertions, 259 deletions
diff --git a/build/linux/system.gyp b/build/linux/system.gyp
index 9cb15b7..7911ae9 100644
--- a/build/linux/system.gyp
+++ b/build/linux/system.gyp
@@ -107,6 +107,255 @@
},
], # targets
}],
+ [ 'use_x11==1', {
+ # Hide X11 and related dependencies when use_x11=0
+ 'targets': [
+ {
+ 'target_name': 'x11',
+ 'type': 'none',
+ 'toolsets': ['host', 'target'],
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags x11)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l x11 xi)',
+ ],
+ },
+ }, {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(pkg-config --cflags x11)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
+ ],
+ 'libraries': [
+ '<!@(pkg-config --libs-only-l x11 xi)',
+ ],
+ },
+ }],
+ ],
+ },
+ {
+ 'target_name': 'xcursor',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xcursor)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xcursor)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xcursor)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xcomposite',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xcomposite)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xcomposite)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xcomposite)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xdamage',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xdamage)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xdamage)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xdamage)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xext',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xext)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xext)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xfixes',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xfixes)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xfixes)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xi',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xi)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xi)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xi)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xrandr',
+ 'type': 'none',
+ 'toolsets': ['host', 'target'],
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xrandr)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xrandr)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xrandr)',
+ ],
+ },
+ }, {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(pkg-config --cflags xrandr)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(pkg-config --libs-only-L --libs-only-other xrandr)',
+ ],
+ 'libraries': [
+ '<!@(pkg-config --libs-only-l xrandr)',
+ ],
+ },
+ }],
+ ],
+ },
+ {
+ 'target_name': 'xrender',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xrender)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xrender)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xrender)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xscrnsaver',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xscrnsaver)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xscrnsaver)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xscrnsaver)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xtst',
+ 'type': 'none',
+ 'toolsets': ['host', 'target'],
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xtst)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xtst)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xtst)',
+ ],
+ },
+ }, {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(pkg-config --cflags xtst)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(pkg-config --libs-only-L --libs-only-other xtst)',
+ ],
+ 'libraries': [
+ '<!@(pkg-config --libs-only-l xtst)',
+ ],
+ },
+ }]
+ ]
+ }
+ ], # targets
+ }],
], # conditions
'targets': [
{
@@ -755,249 +1004,5 @@
}],
],
},
- {
- 'target_name': 'x11',
- 'type': 'none',
- 'toolsets': ['host', 'target'],
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags x11)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l x11 xi)',
- ],
- },
- }, {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(pkg-config --cflags x11)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
- ],
- 'libraries': [
- '<!@(pkg-config --libs-only-l x11 xi)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'xcursor',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xcursor)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xcursor)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xcursor)',
- ],
- },
- },
- {
- 'target_name': 'xcomposite',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xcomposite)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xcomposite)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xcomposite)',
- ],
- },
- },
- {
- 'target_name': 'xdamage',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xdamage)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xdamage)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xdamage)',
- ],
- },
- },
- {
- 'target_name': 'xext',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xext)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xext)',
- ],
- },
- },
- {
- 'target_name': 'xfixes',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xfixes)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xfixes)',
- ],
- },
- },
- {
- 'target_name': 'xi',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xi)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xi)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xi)',
- ],
- },
- },
- {
- 'target_name': 'xrandr',
- 'type': 'none',
- 'toolsets': ['host', 'target'],
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xrandr)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xrandr)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xrandr)',
- ],
- },
- }, {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(pkg-config --cflags xrandr)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(pkg-config --libs-only-L --libs-only-other xrandr)',
- ],
- 'libraries': [
- '<!@(pkg-config --libs-only-l xrandr)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'xrender',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xrender)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xrender)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xrender)',
- ],
- },
- },
- {
- 'target_name': 'xscrnsaver',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xscrnsaver)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xscrnsaver)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xscrnsaver)',
- ],
- },
- },
- {
- 'target_name': 'xtst',
- 'type': 'none',
- 'toolsets': ['host', 'target'],
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xtst)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xtst)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xtst)',
- ],
- },
- }, {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(pkg-config --cflags xtst)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(pkg-config --libs-only-L --libs-only-other xtst)',
- ],
- 'libraries': [
- '<!@(pkg-config --libs-only-l xtst)',
- ],
- },
- }]
- ]
- }
],
}
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 1df85a1..0ddcf20 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3450,7 +3450,6 @@
'dependencies': [
'../build/linux/system.gyp:dbus',
'../build/linux/system.gyp:fontconfig',
- '../build/linux/system.gyp:x11',
'../dbus/dbus.gyp:dbus',
],
'sources/': [
@@ -3463,6 +3462,12 @@
['exclude', '^browser/lifetime/application_lifetime_stub.cc'],
],
}],
+ # x11 build
+ ['use_x11==1', {
+ 'dependencies': [
+ '../build/linux/system.gyp:x11',
+ ],
+ }],
],
}],
['enable_plugin_installation==0', {
diff --git a/chrome/chrome_browser_extensions.gypi b/chrome/chrome_browser_extensions.gypi
index 83a4da4..ab7779a 100644
--- a/chrome/chrome_browser_extensions.gypi
+++ b/chrome/chrome_browser_extensions.gypi
@@ -1038,12 +1038,21 @@
'../ui/keyboard/keyboard.gyp:keyboard_resources',
],
}],
- ['OS=="linux" and use_aura==1', {
- 'dependencies': [
- '../build/linux/system.gyp:dbus',
- '../build/linux/system.gyp:fontconfig',
- '../build/linux/system.gyp:x11',
- '../dbus/dbus.gyp:dbus',
+ ['OS=="linux"', {
+ 'conditions': [
+ ['use_aura==1', {
+ 'dependencies': [
+ '../build/linux/system.gyp:dbus',
+ '../build/linux/system.gyp:fontconfig',
+ '../dbus/dbus.gyp:dbus',
+ ],
+ }],
+ # x11 build
+ ['use_x11==1', {
+ 'dependencies': [
+ '../build/linux/system.gyp:x11',
+ ],
+ }],
],
}],
['safe_browsing==1', {
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
index 3e755b3..f687842 100644
--- a/chrome/chrome_browser_ui.gypi
+++ b/chrome/chrome_browser_ui.gypi
@@ -3326,7 +3326,6 @@
'dependencies': [
'../build/linux/system.gyp:dbus',
'../build/linux/system.gyp:fontconfig',
- '../build/linux/system.gyp:x11',
'../dbus/dbus.gyp:dbus',
],
}],
@@ -3337,6 +3336,12 @@
['exclude', '^browser/ui/views/notifications/balloon_collection_views.cc'],
],
}],
+ # x11 build
+ ['use_x11==1', {
+ 'dependencies': [
+ '../build/linux/system.gyp:x11',
+ ],
+ }],
],
}],
# On chromeos, file manager extension handles the file open/save dialog.
diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi
index 5e5f582..7ef8f48 100644
--- a/chrome/chrome_exe.gypi
+++ b/chrome/chrome_exe.gypi
@@ -201,13 +201,18 @@
'<@(chromium_child_dependencies)',
'../content/content.gyp:content_app_both',
# Needed for chrome_main.cc initialization of libraries.
- '../build/linux/system.gyp:x11',
'../build/linux/system.gyp:pangocairo',
- '../build/linux/system.gyp:xext',
# Needed to use the master_preferences functions
'installer_util',
],
}],
+ # x11 build. Needed for chrome_main.cc initialization of libraries.
+ ['use_x11==1', {
+ 'dependencies': [
+ '../build/linux/system.gyp:x11',
+ '../build/linux/system.gyp:xext',
+ ],
+ }],
],
'sources': [
'app/chrome_dll_resource.h',
diff --git a/gpu/tools/tools.gyp b/gpu/tools/tools.gyp
index d34f628..f659d72 100644
--- a/gpu/tools/tools.gyp
+++ b/gpu/tools/tools.gyp
@@ -9,7 +9,7 @@
'targets': [
],
'conditions': [
- ['OS == "linux" and target_arch != "arm"', {
+ ['OS == "linux" and target_arch != "arm" and use_x11==1', {
'targets': [
{
'target_name': 'compositor_model_bench',
diff --git a/media/cast/cast.gyp b/media/cast/cast.gyp
index a0dbf44..e1a57dc 100644
--- a/media/cast/cast.gyp
+++ b/media/cast/cast.gyp
@@ -184,7 +184,7 @@
'<(DEPTH)/media/cast/test/receiver.cc',
],
'conditions': [
- ['OS == "linux"', {
+ ['OS == "linux" and use_x11==1', {
'dependencies': [
'<(DEPTH)/build/linux/system.gyp:x11',
'<(DEPTH)/build/linux/system.gyp:xext',
diff --git a/tools/android/forwarder2/forwarder.gyp b/tools/android/forwarder2/forwarder.gyp
index 872fe56..a3f2898 100644
--- a/tools/android/forwarder2/forwarder.gyp
+++ b/tools/android/forwarder2/forwarder.gyp
@@ -62,7 +62,6 @@
'toolsets': ['host'],
'dependencies': [
'../../../base/base.gyp:base',
- '../../../build/linux/system.gyp:x11',
'../common/common.gyp:android_tools_common',
],
'include_dirs': [
@@ -78,8 +77,8 @@
'host_forwarder_main.cc',
'pipe_notifier.cc',
'socket.cc',
- # TODO(pliard): Remove this and x11 dependency above. This is needed
- # to avoid undefined references at link time.
+ # TODO(pliard): Remove this. This is needed to avoid undefined
+ # references at link time.
'../../../base/message_loop/message_pump_glib.cc',
'../../../base/message_loop/message_pump_gtk.cc',
],