Commit 9e7a9160 authored by sadrul@chromium.org's avatar sadrul@chromium.org

x11: Split the gfx_x11 target into its own gyp file.

Add a gfx_x11.gyp in //ui/gfx/x/ and define the gfx_x11 target in there,
instead of defining it conditionally in //ui/gfx/gfx.gyp. This allows
including this code from particular components even when X11 is turned
off.

BUG=361137
R=piman@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/275273002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269804 0039d316-1c4b-4281-b951-d872f2087c98
parent d738857a
...@@ -2116,10 +2116,12 @@ ...@@ -2116,10 +2116,12 @@
# Enable built-in ozone platforms if ozone is enabled. # Enable built-in ozone platforms if ozone is enabled.
'ozone_platform_caca%': 0, 'ozone_platform_caca%': 0,
'ozone_platform_dri%': 1, 'ozone_platform_dri%': 1,
'ozone_platform_ozonex%': 0,
'ozone_platform_test%': 1, 'ozone_platform_test%': 1,
}, { # use_ozone==0 }, { # use_ozone==0
'ozone_platform_caca%': 0, 'ozone_platform_caca%': 0,
'ozone_platform_dri%': 0, 'ozone_platform_dri%': 0,
'ozone_platform_ozonex%': 0,
'ozone_platform_test%': 0, 'ozone_platform_test%': 0,
}], }],
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
}, },
], # targets ], # targets
}], }],
[ 'use_x11==1', { [ 'use_x11==1 or ozone_platform_ozonex==1', {
# Hide X11 and related dependencies when use_x11=0 # Hide X11 and related dependencies when use_x11=0
'targets': [ 'targets': [
{ {
......
...@@ -3402,7 +3402,7 @@ ...@@ -3402,7 +3402,7 @@
['use_x11==1', { ['use_x11==1', {
'dependencies': [ 'dependencies': [
'../build/linux/system.gyp:x11', '../build/linux/system.gyp:x11',
'../ui/gfx/gfx.gyp:gfx_x11', '../ui/gfx/x/gfx_x11.gyp:gfx_x11',
], ],
}], }],
], ],
......
...@@ -1070,7 +1070,7 @@ ...@@ -1070,7 +1070,7 @@
['use_aura==1 and use_x11==1', { ['use_aura==1 and use_x11==1', {
'dependencies': [ 'dependencies': [
'../build/linux/system.gyp:x11', '../build/linux/system.gyp:x11',
'../ui/gfx/gfx.gyp:gfx_x11', '../ui/gfx/x/gfx_x11.gyp:gfx_x11',
], ],
}], }],
['enable_printing != 0', { ['enable_printing != 0', {
......
...@@ -647,7 +647,7 @@ ...@@ -647,7 +647,7 @@
['use_x11==1', { ['use_x11==1', {
'dependencies': [ 'dependencies': [
'../build/linux/system.gyp:x11', '../build/linux/system.gyp:x11',
'../ui/gfx/gfx.gyp:gfx_x11', '../ui/gfx/x/gfx_x11.gyp:gfx_x11',
] ]
}] }]
], ],
......
...@@ -378,7 +378,7 @@ ...@@ -378,7 +378,7 @@
['use_x11 == 1', { ['use_x11 == 1', {
'dependencies': [ 'dependencies': [
'../build/linux/system.gyp:x11', '../build/linux/system.gyp:x11',
'../ui/gfx/gfx.gyp:gfx_x11', '../ui/gfx/x/gfx_x11.gyp:gfx_x11',
], ],
}, { }, {
# use_x11 == 0 # use_x11 == 0
...@@ -555,7 +555,7 @@ ...@@ -555,7 +555,7 @@
], ],
['use_x11 == 1', { ['use_x11 == 1', {
'dependencies': [ 'dependencies': [
'../ui/gfx/gfx.gyp:gfx_x11', '../ui/gfx/x/gfx_x11.gyp:gfx_x11',
], ],
}] }]
], ],
......
...@@ -1435,7 +1435,7 @@ ...@@ -1435,7 +1435,7 @@
['use_x11==1', { ['use_x11==1', {
'dependencies': [ 'dependencies': [
'../build/linux/system.gyp:x11', # Used by rendering_helper.cc '../build/linux/system.gyp:x11', # Used by rendering_helper.cc
'../ui/gfx/gfx.gyp:gfx_x11', '../ui/gfx/x/gfx_x11.gyp:gfx_x11',
], ],
}], }],
], ],
......
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
'conditions': [ 'conditions': [
['use_x11==1', { ['use_x11==1', {
'dependencies': [ 'dependencies': [
'../gfx/gfx.gyp:gfx_x11', '../gfx/x/gfx_x11.gyp:gfx_x11',
], ],
}], }],
] ]
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
'conditions': [ 'conditions': [
['use_x11==1', { ['use_x11==1', {
'dependencies': [ 'dependencies': [
'../gfx/gfx.gyp:gfx_x11', '../gfx/x/gfx_x11.gyp:gfx_x11',
], ],
}], }],
] ]
......
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
['use_x11==1', { ['use_x11==1', {
'dependencies': [ 'dependencies': [
'<(DEPTH)/build/linux/system.gyp:x11', '<(DEPTH)/build/linux/system.gyp:x11',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx_x11', '<(DEPTH)/ui/gfx/x/gfx_x11.gyp:gfx_x11',
] ]
}] }]
] ]
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
['use_x11==1', { ['use_x11==1', {
'dependencies': [ 'dependencies': [
'../../build/linux/system.gyp:x11', '../../build/linux/system.gyp:x11',
'../gfx/gfx.gyp:gfx_x11', '../gfx/x/gfx_x11.gyp:gfx_x11',
], ],
}], }],
], ],
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
], ],
'dependencies': [ 'dependencies': [
'../../build/linux/system.gyp:x11', '../../build/linux/system.gyp:x11',
'../gfx/gfx.gyp:gfx_x11', '../gfx/x/gfx_x11.gyp:gfx_x11',
], ],
}], }],
['use_glib==1', { ['use_glib==1', {
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
['use_x11==1', { ['use_x11==1', {
'dependencies': [ 'dependencies': [
'../../build/linux/system.gyp:x11', '../../build/linux/system.gyp:x11',
'../gfx/gfx.gyp:gfx_x11', '../gfx/x/gfx_x11.gyp:gfx_x11',
], ],
}], }],
['OS=="ios"', { ['OS=="ios"', {
......
...@@ -372,7 +372,7 @@ ...@@ -372,7 +372,7 @@
}], }],
['use_x11==1', { ['use_x11==1', {
'dependencies': [ 'dependencies': [
'gfx_x11', 'x/gfx_x11.gyp:gfx_x11',
], ],
}], }],
['use_pango==1', { ['use_pango==1', {
...@@ -557,31 +557,5 @@ ...@@ -557,31 +557,5 @@
}, },
], ],
}], }],
['use_x11 == 1', {
'targets': [
{
'target_name': 'gfx_x11',
'type': '<(component)',
'dependencies': [
'../../base/base.gyp:base',
'../../build/linux/system.gyp:x11',
'gfx_geometry',
],
'defines': [
'GFX_IMPLEMENTATION',
],
'sources': [
'x/x11_atom_cache.cc',
'x/x11_atom_cache.h',
'x/x11_connection.cc',
'x/x11_connection.h',
'x/x11_error_tracker.cc',
'x/x11_error_tracker.h',
'x/x11_types.cc',
'x/x11_types.h',
],
},
]
}],
], ],
} }
# Copyright 2014 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.
{
'variables': {
'chromium_code': 1,
'use_x11': 1, # It is necessary to explicitly set use_x11 here to make sure
# that the exclusion rules in filename_rules.gypi do not
# exclude the x11* files.
},
'targets': [
{
'target_name': 'gfx_x11',
'type': '<(component)',
'dependencies': [
'../../../base/base.gyp:base',
'../../../build/linux/system.gyp:x11',
],
'defines': [
'GFX_IMPLEMENTATION',
],
'sources': [
'x11_atom_cache.cc',
'x11_atom_cache.h',
'x11_connection.cc',
'x11_connection.h',
'x11_error_tracker.cc',
'x11_error_tracker.h',
'x11_types.cc',
'x11_types.h',
],
},
]
}
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
'<(DEPTH)/build/linux/system.gyp:x11', '<(DEPTH)/build/linux/system.gyp:x11',
'<(DEPTH)/build/linux/system.gyp:xcomposite', '<(DEPTH)/build/linux/system.gyp:xcomposite',
'<(DEPTH)/build/linux/system.gyp:xext', '<(DEPTH)/build/linux/system.gyp:xext',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx_x11', '<(DEPTH)/ui/gfx/x/gfx_x11.gyp:gfx_x11',
], ],
}], }],
['OS=="win"', { ['OS=="win"', {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment