diff options
author | epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-06-02 14:38:23 +0000 |
---|---|---|
committer | epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-06-02 14:38:23 +0000 |
commit | ccdbd2c52206dfc35ae98dce0dce902a96f7ae3b (patch) | |
tree | ae24b966fdcba0ea3e469b43857659dde57fdf36 | |
parent | f850d096af03a8a15243db43038ba9d94116fd25 (diff) |
create GYP files for these targets: tests, gm, skhello, skimage, skdiff
see http://codereview.appspot.com/4536096/
git-svn-id: http://skia.googlecode.com/svn/trunk@1479 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | gyp/all.gyp | 11 | ||||
-rw-r--r-- | gyp/apptype_console.gypi | 27 | ||||
-rw-r--r-- | gyp/bench.gyp | 26 | ||||
-rw-r--r-- | gyp/core.gyp | 2 | ||||
-rw-r--r-- | gyp/gm.gyp | 52 | ||||
-rw-r--r-- | gyp/images.gyp | 11 | ||||
-rw-r--r-- | gyp/tests.gyp | 95 | ||||
-rw-r--r-- | gyp/tools.gyp | 67 |
8 files changed, 274 insertions, 17 deletions
diff --git a/gyp/all.gyp b/gyp/all.gyp index 58c0419bc2..e2f745a2a7 100644 --- a/gyp/all.gyp +++ b/gyp/all.gyp @@ -1,11 +1,20 @@ # Creates a Makefile that is capable of building all executable targets. +# +# To build on Linux: +# ./gyp_skia && make all +# +# Building on other platforms not tested yet. +# { 'targets': [ { 'target_name': 'all', 'type': 'none', 'dependencies': [ - 'SampleApp.gyp:SampleApp' + 'gm.gyp:gm', + 'SampleApp.gyp:SampleApp', + 'tests.gyp:tests', + 'tools.gyp:tools', ], }, ], diff --git a/gyp/apptype_console.gypi b/gyp/apptype_console.gypi new file mode 100644 index 0000000000..b686fa71ef --- /dev/null +++ b/gyp/apptype_console.gypi @@ -0,0 +1,27 @@ +# target_defaults used for executable targets that generate a console app +{ + 'target_defaults': { + 'mac_bundle' : 1, + 'msvs_settings': { + 'VCLinkerTool': { + #Allows for creation / output to console. + #Console (/SUBSYSTEM:CONSOLE) + 'SubSystem': '1', + + #Console app, use main/wmain + 'EntryPointSymbol': 'mainCRTStartup', + + 'AdditionalDependencies': [ + 'OpenGL32.lib', + 'usp10.lib', + ], + }, + }, + }, +} + +# Local Variables: +# tab-width:2 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=2 shiftwidth=2: diff --git a/gyp/bench.gyp b/gyp/bench.gyp index db1bcb169d..6054c23345 100644 --- a/gyp/bench.gyp +++ b/gyp/bench.gyp @@ -1,5 +1,14 @@ +# GYP file to build performance testbench. +# +# To build and run on Linux: +# ./gyp_skia bench.gyp && make +# out/Debug/bench -repeat 2 +# +# Building on other platforms not tested yet. +# { 'includes': [ + 'apptype_console.gypi', 'target_defaults.gypi', ], 'targets': [ @@ -29,21 +38,6 @@ 'images.gyp:images', 'utils.gyp:utils', ], - 'msvs_settings': { - 'VCLinkerTool': { - #Allows for creation / output to console. - #Console (/SUBSYSTEM:CONSOLE) - 'SubSystem': '1', - - #Console app, use main/wmain - 'EntryPointSymbol': 'mainCRTStartup', - - 'AdditionalDependencies': [ - 'OpenGL32.lib', - 'usp10.lib', - ], - }, - }, }, ], } @@ -52,4 +46,4 @@ # tab-width:2 # indent-tabs-mode:nil # End: -# vim: set expandtab tabstop=2 shiftwidth=2:
\ No newline at end of file +# vim: set expandtab tabstop=2 shiftwidth=2: diff --git a/gyp/core.gyp b/gyp/core.gyp index 68f960d6f0..3c207a9045 100644 --- a/gyp/core.gyp +++ b/gyp/core.gyp @@ -68,6 +68,7 @@ '../src/core/SkFP.h', '../src/core/SkFilterProc.cpp', '../src/core/SkFilterProc.h', + '../src/core/SkFlate.cpp', '../src/core/SkFlattenable.cpp', '../src/core/SkFloat.cpp', '../src/core/SkFloat.h', @@ -184,6 +185,7 @@ '../include/core/SkEndian.h', '../include/core/SkFDot6.h', '../include/core/SkFixed.h', + '../include/core/SkFlate.h', '../include/core/SkFlattenable.h', '../include/core/SkFloatBits.h', '../include/core/SkFloatingPoint.h', diff --git a/gyp/gm.gyp b/gyp/gm.gyp new file mode 100644 index 0000000000..a53edb1b34 --- /dev/null +++ b/gyp/gm.gyp @@ -0,0 +1,52 @@ +# GYP file to build the "gm" (golden master) executable. +# +# To build and run on Linux: +# ./gyp_skia gm.gyp && make +# out/Debug/gm -r ../gm/base-linux +# +# Building on other platforms not tested yet. +# +{ + 'includes': [ + 'apptype_console.gypi', + 'target_defaults.gypi', + ], + 'targets': [ + { + 'target_name': 'gm', + 'type': 'executable', + 'sources': [ + '../gm/bitmapfilters.cpp', + '../gm/blurs.cpp', + '../gm/filltypes.cpp', + '../gm/gradients.cpp', + '../gm/nocolorbleed.cpp', + '../gm/pathfill.cpp', + '../gm/points.cpp', + '../gm/poly2poly.cpp', + '../gm/shadows.cpp', + '../gm/shapes.cpp', + '../gm/strokerects.cpp', + '../gm/tilemodes.cpp', + '../gm/xfermodes.cpp', + '../gm/shadertext.cpp', + '../gm/complexclip.cpp', + '../gm/gmmain.cpp', + ], + 'dependencies': [ + 'core.gyp:core', + 'effects.gyp:effects', + 'gpu.gyp:gr', + 'gpu.gyp:skgr', + 'images.gyp:images', + 'utils.gyp:utils', + ], + }, + ], +} + +# Local Variables: +# tab-width:2 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=2 shiftwidth=2: diff --git a/gyp/images.gyp b/gyp/images.gyp index 4e49f12e30..fef7aae924 100644 --- a/gyp/images.gyp +++ b/gyp/images.gyp @@ -84,6 +84,17 @@ '../src/images/SkJpegUtility.cpp', '../src/images/SkMovie_gif.cpp', ], + 'link_settings': { + # Any targets that depend on this target should link in libpng and + # our code that calls it. + # See http://code.google.com/p/gyp/wiki/InputFormatReference#Dependent_Settings + 'sources': [ + '../src/images/SkImageDecoder_libpng.cpp', + ], + 'libraries': [ + '-lpng', + ], + }, }], ], diff --git a/gyp/tests.gyp b/gyp/tests.gyp new file mode 100644 index 0000000000..2756b90a73 --- /dev/null +++ b/gyp/tests.gyp @@ -0,0 +1,95 @@ +# GYP file to build unit tests. +# +# To build and run on Linux: +# ./gyp_skia tests.gyp && make +# out/Debug/tests +# +# To build on Linux with skia_pdf_support disabled: +# ./gyp_skia tests.gyp -Dskia_pdf_support=false && make +# +# Building on other platforms not tested yet. +# +{ + 'includes': [ + 'apptype_console.gypi', + 'target_defaults.gypi', + ], + 'variables': { + 'skia_pdf_support%': 'true', + }, + 'targets': [ + { + 'target_name': 'tests', + 'type': 'executable', + 'include_dirs' : [ + '../include/pdf', + '../src/core', + ], + 'sources': [ + '../tests/BitmapCopyTest.cpp', + '../tests/BitmapGetColorTest.cpp', + '../tests/BlitRowTest.cpp', + '../tests/ClampRangeTest.cpp', + '../tests/ClipCubicTest.cpp', + '../tests/ClipStackTest.cpp', + '../tests/ClipperTest.cpp', + '../tests/ColorFilterTest.cpp', + '../tests/ColorTest.cpp', + '../tests/DequeTest.cpp', + '../tests/DrawBitmapRectTest.cpp', + '../tests/FillPathTest.cpp', + '../tests/FlateTest.cpp', + '../tests/GeometryTest.cpp', + '../tests/InfRectTest.cpp', + '../tests/MathTest.cpp', + '../tests/MatrixTest.cpp', + '../tests/MetaDataTest.cpp', + '../tests/PackBitsTest.cpp', + '../tests/PaintTest.cpp', + '../tests/ParsePathTest.cpp', + '../tests/PathMeasureTest.cpp', + '../tests/PathTest.cpp', + '../tests/PDFPrimitivesTest.cpp', + '../tests/Reader32Test.cpp', + '../tests/RefDictTest.cpp', + '../tests/RegionTest.cpp', + '../tests/Sk64Test.cpp', + '../tests/skia_test.cpp', + '../tests/SortTest.cpp', + '../tests/SrcOverTest.cpp', + '../tests/StreamTest.cpp', + '../tests/StringTest.cpp', + '../tests/Test.cpp', + '../tests/TestSize.cpp', + '../tests/UtilsTest.cpp', + '../tests/Writer32Test.cpp', + '../tests/XfermodeTest.cpp', + ], + 'dependencies': [ + 'core.gyp:core', + 'effects.gyp:effects', + 'images.gyp:images', + 'utils.gyp:utils', + ], + 'conditions': [ + [ 'skia_pdf_support == "true"', + { # if skia_pdf_support is TRUE, depend on pdf.gyp... + 'dependencies': [ + 'pdf.gyp:pdf', + ], + }, { # else, we don't need PDFPrimitivesTest.cpp after all. + 'sources!': [ + '../tests/PDFPrimitivesTest.cpp', + ], + } + ], + ], + }, + ], +} + +# Local Variables: +# tab-width:2 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=2 shiftwidth=2: diff --git a/gyp/tools.gyp b/gyp/tools.gyp new file mode 100644 index 0000000000..939b32ac03 --- /dev/null +++ b/gyp/tools.gyp @@ -0,0 +1,67 @@ +# GYP file to build various tools. +# +# To build on Linux: +# ./gyp_skia tools.gyp && make tools +# +# Building on other platforms not tested yet. +# +{ + 'includes': [ + 'apptype_console.gypi', + 'target_defaults.gypi', + ], + 'targets': [ + { + # Build all executable targets defined below. + 'target_name': 'tools', + 'type': 'none', + 'dependencies': [ + 'skdiff', + 'skhello', + 'skimage', + ], + }, + { + 'target_name': 'skdiff', + 'type': 'executable', + 'sources': [ + '../tools/skdiff_main.cpp', + ], + 'dependencies': [ + 'core.gyp:core', + 'images.gyp:images', + 'utils.gyp:utils', + ], + }, + { + 'target_name': 'skhello', + 'type': 'executable', + 'sources': [ + '../tools/skhello.cpp', + ], + 'dependencies': [ + 'core.gyp:core', + 'images.gyp:images', + 'utils.gyp:utils', + ], + }, + { + 'target_name': 'skimage', + 'type': 'executable', + 'sources': [ + '../tools/skimage_main.cpp', + ], + 'dependencies': [ + 'core.gyp:core', + 'images.gyp:images', + 'utils.gyp:utils', + ], + }, + ], +} + +# Local Variables: +# tab-width:2 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=2 shiftwidth=2: |