Clean up uses of use_glib that are not related to glib dependencies
We're frequently using the use_glib gyp variable as a shorthand for:
OS!="win" and OS!="mac" and OS!="ios" and OS!="android"
This should be equivalent to:
desktop_linux == 1 or chromeos == 1
Embedded builds want to remove as many dependencies as possible. This
cleans up uses of the use_glib variable so we can turn it off on linux
without breaking the build.
BUG=316226
Review URL: https://codereview.chromium.org/61923004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233804 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: b098e1d8b492803cbb2857f684fdc34460fdc9e1
diff --git a/base/base.gyp b/base/base.gyp
index f9ac7f3..b852efd 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -35,7 +35,7 @@
],
},
'conditions': [
- ['use_glib==1', {
+ ['desktop_linux == 1 or chromeos == 1', {
'conditions': [
['chromeos==1', {
'sources/': [ ['include', '_chromeos\\.cc$'] ]
@@ -51,7 +51,6 @@
],
'dependencies': [
'symbolize',
- '../build/linux/system.gyp:glib',
'xdg_mime',
],
'defines': [
@@ -60,15 +59,20 @@
'cflags': [
'-Wno-write-strings',
],
- 'export_dependent_settings': [
- '../build/linux/system.gyp:glib',
- ],
- }, { # use_glib!=1
+ }, { # desktop_linux == 0 and chromeos == 0
'sources/': [
['exclude', '/xdg_user_dirs/'],
['exclude', '_nss\\.cc$'],
],
}],
+ ['use_glib==1', {
+ 'dependencies': [
+ '../build/linux/system.gyp:glib',
+ ],
+ 'export_dependent_settings': [
+ '../build/linux/system.gyp:glib',
+ ],
+ }],
['use_x11==1', {
'dependencies': [
'../build/linux/system.gyp:x11',
@@ -688,7 +692,7 @@
'module_dir': 'base'
},
'conditions': [
- ['use_glib==1', {
+ ['desktop_linux == 1 or chromeos == 1', {
'defines': [
'USE_SYMBOLIZE',
],
@@ -749,7 +753,7 @@
},
],
}],
- ['use_glib==1', {
+ ['desktop_linux == 1 or chromeos == 1', {
'sources!': [
'file_version_info_unittest.cc',
],
@@ -764,11 +768,19 @@
}],
],
'dependencies': [
- '../build/linux/system.gyp:glib',
'../build/linux/system.gyp:ssl',
+ ],
+ }],
+ ['use_x11 == 1', {
+ 'dependencies': [
'../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
],
- }, { # use_glib!=1
+ }],
+ ['use_glib == 1', {
+ 'dependencies': [
+ '../build/linux/system.gyp:glib',
+ ],
+ }, { # use_glib == 0
'sources!': [
'message_loop/message_pump_glib_unittest.cc',
]