diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-02 14:03:32 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-02 14:03:32 +0000 |
commit | cf8fb1f6f03fc77f9927564f9ef9abeeeec508d2 (patch) | |
tree | 7534f5f2edd97cd61f18ee35ae4a14407a53453e /gyp | |
parent | f2a9e58858423be9cbfa72e01e8284754e7d6381 (diff) |
Create GPU-less build of Skia.
git-svn-id: http://skia.googlecode.com/svn/trunk@4912 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gyp')
-rw-r--r-- | gyp/SampleApp.gyp | 13 | ||||
-rw-r--r-- | gyp/bench.gyp | 28 | ||||
-rw-r--r-- | gyp/common_conditions.gypi | 12 | ||||
-rw-r--r-- | gyp/common_variables.gypi | 2 | ||||
-rw-r--r-- | gyp/debugger.gyp | 1 | ||||
-rw-r--r-- | gyp/effects.gyp | 12 | ||||
-rw-r--r-- | gyp/gm.gyp | 14 | ||||
-rw-r--r-- | gyp/gpu.gyp | 25 | ||||
-rw-r--r-- | gyp/shapeops_demo.gyp | 8 | ||||
-rw-r--r-- | gyp/shapeops_edge.gyp | 14 | ||||
-rw-r--r-- | gyp/tests.gyp | 14 | ||||
-rw-r--r-- | gyp/views.gyp | 6 |
12 files changed, 122 insertions, 27 deletions
diff --git a/gyp/SampleApp.gyp b/gyp/SampleApp.gyp index 852d7f74bd..2db2a184cb 100644 --- a/gyp/SampleApp.gyp +++ b/gyp/SampleApp.gyp @@ -9,7 +9,6 @@ '../src/core', # needed to get SkConcaveToTriangle, maybe this should be moved to include dir? '../gm', # needed to pull gm.h '../samplecode', # To pull SampleApp.h and SampleCode.h - '../src/gpu', # To pull gl/GrGLUtil.h '../src/pipe/utils', # For TiledPipeController ], 'includes': [ @@ -151,8 +150,6 @@ 'animator.gyp:animator', 'xml.gyp:xml', 'experimental.gyp:experimental', - 'gpu.gyp:gr', - 'gpu.gyp:skgr', 'pdf.gyp:pdf', 'views_animated.gyp:views_animated', ], @@ -237,7 +234,6 @@ '../experimental/iOSSampleApp/iPad', '../experimental/iOSSampleApp/iPhone', '../include/utils/ios', - '../../include/gpu', ], 'xcode_config_file': '../experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig', 'mac_bundle_resources' : [ @@ -258,6 +254,15 @@ 'android_system.gyp:SampleAppAndroid', ], }], + [ 'skia_gpu == 1', { + 'include_dirs': [ + '../src/gpu', # To pull gl/GrGLUtil.h + ], + 'dependencies': [ + 'gpu.gyp:gr', + 'gpu.gyp:skgr', + ], + }], ], 'msvs_settings': { 'VCLinkerTool': { diff --git a/gyp/bench.gyp b/gyp/bench.gyp index dcf9b5f8c2..44ebbf2d0e 100644 --- a/gyp/bench.gyp +++ b/gyp/bench.gyp @@ -10,7 +10,6 @@ 'type': 'executable', 'include_dirs' : [ '../src/core', - '../src/gpu', ], 'includes': [ 'bench.gypi' @@ -18,13 +17,24 @@ 'dependencies': [ 'core.gyp:core', 'effects.gyp:effects', - 'gpu.gyp:gr', - 'gpu.gyp:skgr', 'images.gyp:images', 'ports.gyp:ports', 'utils.gyp:utils', 'bench_timer', ], + 'conditions': [ + ['skia_gpu == 1', + { + 'include_dirs' : [ + '../src/gpu', + ], + 'dependencies': [ + 'gpu.gyp:gr', + 'gpu.gyp:skgr', + ], + }, + ], + ], }, { 'target_name' : 'bench_timer', @@ -38,8 +48,6 @@ '../bench/BenchSysTimer_posix.cpp', '../bench/BenchSysTimer_windows.h', '../bench/BenchSysTimer_windows.cpp', - '../bench/BenchGpuTimer_gl.h', - '../bench/BenchGpuTimer_gl.cpp', ], 'include_dirs': [ '../src/core', @@ -47,7 +55,6 @@ ], 'dependencies': [ 'core.gyp:core', - 'gpu.gyp:gr', ], 'conditions': [ [ 'skia_os != "mac"', { @@ -75,6 +82,15 @@ '../bench/BenchSysTimer_windows.cpp', ], }], + ['skia_gpu == 1', { + 'dependencies': [ + 'gpu.gyp:gr', + ], + 'sources': [ + '../bench/BenchGpuTimer_gl.h', + '../bench/BenchGpuTimer_gl.cpp', + ], + }], ], } ], diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index 6dcfd81de8..143e85442b 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -2,7 +2,17 @@ # { 'conditions' : [ - + ['skia_gpu == 1', + { + 'defines': [ + 'SK_SUPPORT_GPU=1', + ], + }, { + 'defines': [ + 'SK_SUPPORT_GPU=0', + ], + }, + ], ['skia_os == "win"', { 'defines': [ diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi index 88e710ef61..d46ec5ebc1 100644 --- a/gyp/common_variables.gypi +++ b/gyp/common_variables.gypi @@ -67,6 +67,7 @@ 'skia_arch_type%': 'x86', 'skia_arch_width%': 32, 'android_make_apk%': 1, + 'skia_gpu%': 1, }, # Re-define all variables defined within the level-2 'variables' dict, @@ -80,6 +81,7 @@ 'skia_arch_type%': '<(skia_arch_type)', 'skia_arch_width%': '<(skia_arch_width)', 'android_make_apk%': '<(android_make_apk)', + 'skia_gpu%': '<(skia_gpu)', }, } # Local Variables: diff --git a/gyp/debugger.gyp b/gyp/debugger.gyp index 34ff4039ac..f2c3fe956b 100644 --- a/gyp/debugger.gyp +++ b/gyp/debugger.gyp @@ -7,7 +7,6 @@ '../src/core', '../debugger', # To pull SkDebugger.h '../debugger/QT', # For all the QT UI Goodies - '../include/gpu/', '../src/gpu', # To pull gl/GrGLUtil.h ], 'sources': [ diff --git a/gyp/effects.gyp b/gyp/effects.gyp index 28369aee10..0a9e8d7d57 100644 --- a/gyp/effects.gyp +++ b/gyp/effects.gyp @@ -5,7 +5,6 @@ 'type': 'static_library', 'include_dirs': [ '../include/effects', - '../src/gpu', ], 'sources': [ '../include/effects/Sk1DPathEffect.h', @@ -98,7 +97,16 @@ }, 'dependencies': [ 'core.gyp:core', - 'gpu.gyp:gr', + ], + 'conditions': [ + ['skia_gpu == 1', { + 'include_dirs': [ + '../src/gpu', + ], + 'dependencies': [ + 'gpu.gyp:gr', + ], + }], ], }, ], diff --git a/gyp/gm.gyp b/gyp/gm.gyp index 20fe09edfd..13f1976441 100644 --- a/gyp/gm.gyp +++ b/gyp/gm.gyp @@ -10,7 +10,6 @@ 'include_dirs' : [ '../src/core', '../src/pipe/utils/', - '../src/gpu', ], 'includes': [ 'gmslides.gypi', @@ -25,8 +24,6 @@ 'dependencies': [ 'core.gyp:core', 'effects.gyp:effects', - 'gpu.gyp:gr', - 'gpu.gyp:skgr', 'images.gyp:images', 'pdf.gyp:pdf', 'ports.gyp:ports', @@ -52,7 +49,16 @@ 'xps.gyp:xps', ], }], - ], + ['skia_gpu == 1', { + 'include_dirs': [ + '../src/gpu', + ], + 'dependencies': [ + 'gpu.gyp:gr', + 'gpu.gyp:skgr', + ], + }], + ], }, ], } diff --git a/gyp/gpu.gyp b/gyp/gpu.gyp index 6a2445d835..c9526ef8a1 100644 --- a/gyp/gpu.gyp +++ b/gyp/gpu.gyp @@ -46,6 +46,31 @@ 'GR_WIN32_BUILD=1', ], }], + # nullify the targets in this gyp file if skia_gpu is 0 + [ 'skia_gpu == 0', { + 'sources/': [ + ['exclude', '.*'], + ], + 'defines/': [ + ['exclude', '.*'], + ], + 'include_dirs/': [ + ['exclude', '.*'], + ], + 'link_settings': { + 'libraries/': [ + ['exclude', '.*'], + ], + }, + 'direct_dependent_settings': { + 'defines/': [ + ['exclude', '.*'], + ], + 'include_dirs/': [ + ['exclude', '.*'], + ], + }, + }], ], 'direct_dependent_settings': { 'conditions': [ diff --git a/gyp/shapeops_demo.gyp b/gyp/shapeops_demo.gyp index 038b28222f..cb1b743ef2 100644 --- a/gyp/shapeops_demo.gyp +++ b/gyp/shapeops_demo.gyp @@ -61,8 +61,6 @@ 'xml.gyp:xml', 'svg.gyp:svg', 'experimental.gyp:experimental', - 'gpu.gyp:gr', - 'gpu.gyp:skgr', 'pdf.gyp:pdf', ], 'conditions' : [ @@ -96,6 +94,12 @@ '../experimental/Intersection/EdgeDemoApp.xib', ], }], + [ 'skia_gpu == 1', { + 'dependencies': [ + 'gpu.gyp:gr', + 'gpu.gyp:skgr', + ], + }], ], 'msvs_settings': { 'VCLinkerTool': { diff --git a/gyp/shapeops_edge.gyp b/gyp/shapeops_edge.gyp index a862c5d14e..55ec5fd570 100644 --- a/gyp/shapeops_edge.gyp +++ b/gyp/shapeops_edge.gyp @@ -10,7 +10,6 @@ 'type': 'executable', 'include_dirs' : [ '../src/core', - '../src/gpu', ], 'sources': [ '../experimental/Intersection/ActiveEdge_Test.cpp', @@ -100,13 +99,22 @@ 'core.gyp:core', 'effects.gyp:effects', 'experimental.gyp:experimental', - 'gpu.gyp:gr', - 'gpu.gyp:skgr', 'images.gyp:images', 'ports.gyp:ports', 'pdf.gyp:pdf', 'utils.gyp:utils', ], + 'conditions': [ + [ 'skia_gpu == 1', { + 'include_dirs': [ + '../src/gpu', + ], + 'dependencies': [ + 'gpu.gyp:gr', + 'gpu.gyp:skgr', + ], + }], + ], }, ], } diff --git a/gyp/tests.gyp b/gyp/tests.gyp index b30a749623..278dce7f71 100644 --- a/gyp/tests.gyp +++ b/gyp/tests.gyp @@ -10,7 +10,6 @@ 'include_dirs' : [ '../src/core', '../src/effects', - '../src/gpu', '../src/pdf', '../src/utils', '../tools/', @@ -96,14 +95,23 @@ 'core.gyp:core', 'effects.gyp:effects', 'experimental.gyp:experimental', - 'gpu.gyp:gr', - 'gpu.gyp:skgr', 'images.gyp:images', 'ports.gyp:ports', 'pdf.gyp:pdf', 'tools.gyp:picture_utils', 'utils.gyp:utils', ], + 'conditions': [ + [ 'skia_gpu == 1', { + 'include_dirs': [ + '../src/gpu', + ], + 'dependencies': [ + 'gpu.gyp:gr', + 'gpu.gyp:skgr', + ], + }], + ], }, ], } diff --git a/gyp/views.gyp b/gyp/views.gyp index fa0a29a115..ec3fd79e6d 100644 --- a/gyp/views.gyp +++ b/gyp/views.gyp @@ -18,7 +18,6 @@ '../include/images', '../include/effects', '../include/views/unix', - '../include/gpu', ], 'dependencies': [ 'angle.gyp:*', @@ -112,6 +111,11 @@ '../src/views/win/skia_win.cpp', ], }], + [ 'skia_gpu == 1', { + 'include_dirs': [ + '../include/gpu', + ], + }], ], 'direct_dependent_settings': { 'include_dirs': [ |