summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authornoyau@chromium.org <noyau@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-23 10:53:36 +0000
committernoyau@chromium.org <noyau@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-23 10:53:36 +0000
commita28e85d16ab0e0f668879654d43ed7b2eb94758d (patch)
treef6088c2bd1dbafefe52dcbd5fac7e11557ec9d3a /ui
parentf6c57d4e7314812cd196e221462e15f57532f72f (diff)
downloadchromium_src-a28e85d16ab0e0f668879654d43ed7b2eb94758d.zip
chromium_src-a28e85d16ab0e0f668879654d43ed7b2eb94758d.tar.gz
chromium_src-a28e85d16ab0e0f668879654d43ed7b2eb94758d.tar.bz2
Alternative way to define the files used by iOS in ui.
Instead of excluding everything and using regexes to pull back what we need for iOS it is more readable to build two lists of files and include them conditionally. BUG=None Review URL: https://chromiumcodereview.appspot.com/10867015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152981 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.gyp62
1 files changed, 26 insertions, 36 deletions
diff --git a/ui/ui.gyp b/ui/ui.gyp
index 13554f5..c832f31 100644
--- a/ui/ui.gyp
+++ b/ui/ui.gyp
@@ -14,9 +14,6 @@
'target_name': 'ui',
'type': '<(component)',
'variables': { 'enable_wexit_time_destructors': 1, },
- 'includes': [
- 'base/ime/ime.gypi',
- ],
'dependencies': [
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
@@ -41,7 +38,26 @@
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
],
- 'sources': [
+ # iOS uses a small subset of ui. common_sources are the only files that
+ # are built on iOS.
+ 'common_sources' : [
+ 'gfx/point.cc',
+ 'gfx/point.h',
+ 'gfx/point_base.h',
+ 'gfx/point3.h',
+ 'gfx/rect.cc',
+ 'gfx/rect.h',
+ 'gfx/rect_base.h',
+ 'gfx/rect_base_impl.h',
+ 'gfx/scoped_ui_graphics_push_context_ios.h',
+ 'gfx/scoped_ui_graphics_push_context_ios.mm',
+ 'gfx/size.cc',
+ 'gfx/size.h',
+ 'gfx/size_base.h',
+ 'gfx/size_base_impl.h',
+ ],
+ 'all_sources': [
+ '<@(_common_sources)',
'base/accelerators/accelerator.cc',
'base/accelerators/accelerator.h',
'base/accelerators/accelerator_cocoa.h',
@@ -412,16 +428,8 @@
'gfx/platform_font_mac.mm',
'gfx/platform_font_win.h',
'gfx/platform_font_win.cc',
- 'gfx/point.cc',
- 'gfx/point.h',
- 'gfx/point_base.h',
'gfx/point_f.cc',
'gfx/point_f.h',
- 'gfx/point3.h',
- 'gfx/rect.cc',
- 'gfx/rect.h',
- 'gfx/rect_base.h',
- 'gfx/rect_base_impl.h',
'gfx/rect_f.cc',
'gfx/rect_f.h',
'gfx/render_text.cc',
@@ -442,18 +450,12 @@
'gfx/scoped_cg_context_save_gstate_mac.h',
'gfx/scoped_ns_graphics_context_save_gstate_mac.h',
'gfx/scoped_ns_graphics_context_save_gstate_mac.mm',
- 'gfx/scoped_ui_graphics_push_context_ios.h',
- 'gfx/scoped_ui_graphics_push_context_ios.mm',
'gfx/scrollbar_size.cc',
'gfx/scrollbar_size.h',
'gfx/selection_model.cc',
'gfx/selection_model.h',
'gfx/shadow_value.cc',
'gfx/shadow_value.h',
- 'gfx/size.cc',
- 'gfx/size.h',
- 'gfx/size_base.h',
- 'gfx/size_base_impl.h',
'gfx/size_f.cc',
'gfx/size_f.h',
'gfx/skbitmap_operations.cc',
@@ -481,9 +483,15 @@
],
'conditions': [
['OS!="ios"', {
+ 'sources' : ['<@(_all_sources)'],
+ 'includes': [
+ 'base/ime/ime.gypi',
+ ],
'dependencies': [
'<(libjpeg_gyp_path):libjpeg',
],
+ }, { # OS=="ios"
+ 'sources' : ['<@(_common_sources)'],
}],
# TODO(asvitkine): Switch all platforms to use canvas_skia.cc.
# http://crbug.com/105550
@@ -700,24 +708,6 @@
},
}],
['OS=="ios"', {
- 'sources/': [
- # iOS uses so little of ui that it is is easier to simply exclude
- # everything and then just select the parts needed.
- # TODO(ios): Add new files as they are made iOS ready.
- ['exclude', '^base/'],
- ['exclude', '^ui_controls/'],
- ['exclude', '^gfx/'],
- ['include', '^gfx/point\\.'],
- ['include', '^gfx/point_base\\.h'],
- ['include', '^gfx/point3\\.h'],
- ['include', '^gfx/rect\\.'],
- ['include', '^gfx/rect_base\\.h'],
- ['include', '^gfx/rect_base_impl\\.h'],
- ['include', '^gfx/size\\.'],
- ['include', '^gfx/size_base\\.h'],
- ['include', '^gfx/size_base_impl\\.h'],
- ['include', '^gfx/scoped_ui_graphics_push_context_ios\\.'],
- ],
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',