• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2015 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5#
6{
7  'targets': [
8    {
9      'target_name': 'SampleApp',
10      'type': 'executable',
11      'include_dirs' : [
12        '../include/private',
13        '../src/core',
14        '../src/effects', #needed for BlurMask.h
15        '../src/gpu', # needed by SkLua.cpp
16        '../src/images',
17        '../src/lazy',
18        '../gm',       # needed to pull gm.h
19        '../samplecode', # To pull SampleApp.h and SampleCode.h
20        '../tools/debugger',
21        '../tools',
22        '../experimental',
23      ],
24      'includes': [
25        'gmslides.gypi',
26      ],
27      'sources': [
28        '../gm/gm.cpp',
29        '../samplecode/GMSampleView.h',
30        '../samplecode/GMSampleView.cpp',
31        '../samplecode/ClockFaceView.cpp',
32        '../samplecode/OverView.cpp',
33        '../samplecode/OverView.h',
34        '../samplecode/PerlinPatch.cpp',
35        '../samplecode/Sample2PtRadial.cpp',
36        '../samplecode/SampleAAClip.cpp',
37        '../samplecode/SampleAARects.cpp',
38        '../samplecode/SampleAARectModes.cpp',
39        '../samplecode/SampleAll.cpp',
40        '../samplecode/SampleAnimatedText.cpp',
41        '../samplecode/SampleAnimator.cpp',
42        '../samplecode/SampleAnimBlur.cpp',
43        '../samplecode/SampleApp.cpp',
44        '../samplecode/SampleArc.cpp',
45        '../samplecode/SampleAtlas.cpp',
46        '../samplecode/SampleBigBlur.cpp',
47        '../samplecode/SampleBigGradient.cpp',
48        '../samplecode/SampleBitmapRect.cpp',
49        '../samplecode/SampleBlur.cpp',
50        '../samplecode/SampleCamera.cpp',
51        '../samplecode/SampleChart.cpp',
52        '../samplecode/SampleCircle.cpp',
53        '../samplecode/SampleClip.cpp',
54        '../samplecode/SampleClipDrawMatch.cpp',
55        '../samplecode/SampleClock.cpp',
56        '../samplecode/SampleCode.h',
57        '../samplecode/SampleColorFilter.cpp',
58        '../samplecode/SampleComplexClip.cpp',
59        '../samplecode/SampleConcavePaths.cpp',
60        '../samplecode/SampleDegenerateTwoPtRadials.cpp',
61        '../samplecode/SampleDither.cpp',
62        '../samplecode/SampleDitherBitmap.cpp',
63        '../samplecode/SampleEffects.cpp',
64        '../samplecode/SampleEmboss.cpp',
65        '../samplecode/SampleFatBits.cpp',
66        '../samplecode/SampleFillType.cpp',
67        '../samplecode/SampleFilter.cpp',
68        '../samplecode/SampleFilter2.cpp',
69        '../samplecode/SampleFilterQuality.cpp',
70        '../samplecode/SampleFilterFuzz.cpp',
71        '../samplecode/SampleFontCache.cpp',
72        '../samplecode/SampleFontScalerTest.cpp',
73        '../samplecode/SampleFuzz.cpp',
74        '../samplecode/SampleGradients.cpp',
75        '../samplecode/SampleHairCurves.cpp',
76        '../samplecode/SampleHairline.cpp',
77        '../samplecode/SampleHairModes.cpp',
78        '../samplecode/SampleHT.cpp',
79        '../samplecode/SampleIdentityScale.cpp',
80        '../samplecode/SampleLayerMask.cpp',
81        '../samplecode/SampleLayers.cpp',
82        '../samplecode/SampleLCD.cpp',
83        '../samplecode/SampleLighting.cpp',
84        '../samplecode/SampleLines.cpp',
85        '../samplecode/SampleLua.cpp',
86        '../samplecode/SampleManyRects.cpp',
87        '../samplecode/SampleMeasure.cpp',
88        '../samplecode/SampleMegaStroke.cpp',
89        '../samplecode/SamplePatch.cpp',
90        '../samplecode/SamplePath.cpp',
91        '../samplecode/SamplePathClip.cpp',
92        '../samplecode/SamplePathFuzz.cpp',
93        '../samplecode/SamplePathEffects.cpp',
94        '../samplecode/SamplePictFile.cpp',
95        '../samplecode/SamplePoints.cpp',
96        '../samplecode/SamplePolyToPoly.cpp',
97        '../samplecode/SampleQuadStroker.cpp',
98        '../samplecode/SampleRectanizer.cpp',
99        '../samplecode/SampleRegion.cpp',
100        '../samplecode/SampleRepeatTile.cpp',
101        '../samplecode/SampleShaders.cpp',
102        '../samplecode/SampleShaderText.cpp',
103        '../samplecode/SampleShip.cpp',
104        '../samplecode/SampleSkLayer.cpp',
105        '../samplecode/SampleSlides.cpp',
106        '../samplecode/SampleStringArt.cpp',
107        '../samplecode/SampleStrokePath.cpp',
108        '../samplecode/SampleSubpixelTranslate.cpp',
109        '../samplecode/SampleText.cpp',
110        '../samplecode/SampleTextAlpha.cpp',
111        '../samplecode/SampleTextBox.cpp',
112        '../samplecode/SampleTextOnPath.cpp',
113        '../samplecode/SampleTextureDomain.cpp',
114        '../samplecode/SampleTiling.cpp',
115        '../samplecode/SampleTinyBitmap.cpp',
116        '../samplecode/SampleUnpremul.cpp',
117        '../samplecode/SampleVertices.cpp',
118        '../samplecode/SampleXfermodesBlur.cpp',
119        '../samplecode/SampleXfer.cpp',
120
121        # DrawingBoard
122        #'../experimental/DrawingBoard/SkColorPalette.h',
123        #'../experimental/DrawingBoard/SkColorPalette.cpp',
124        #'../experimental/DrawingBoard/SkNetPipeController.h',
125        #'../experimental/DrawingBoard/SkNetPipeController.cpp',
126        #'../experimental/DrawingBoard/SampleDrawingClient.cpp',
127        #'../experimental/DrawingBoard/SampleDrawingServer.cpp',
128
129        # Networking
130        #'../experimental/Networking/SampleNetPipeReader.cpp',
131        #'../experimental/Networking/SkSockets.cpp',
132        #'../experimental/Networking/SkSockets.h',
133
134        # PerlinNoise2
135        '../experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp',
136        '../experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h',
137
138        # Lua
139        '../src/utils/SkLuaCanvas.cpp',
140        '../src/utils/SkLua.cpp',
141      ],
142      'sources!': [
143        '../samplecode/SampleSkLayer.cpp', #relies on SkMatrix44 which doesn't compile
144        '../samplecode/SampleFontCache.cpp',
145      ],
146      'dependencies': [
147        'animator.gyp:animator',
148        'etc1.gyp:libetc1',
149        'experimental.gyp:experimental',
150        'flags.gyp:flags',
151        'jsoncpp.gyp:jsoncpp',
152        'lua.gyp:lua',
153        'pdf.gyp:pdf',
154        'skia_lib.gyp:skia_lib',
155        'tools.gyp:resources',
156        'tools.gyp:sk_tool_utils',
157        'tools.gyp:timer',
158        'tools.gyp:url_data_manager',
159        'views.gyp:views',
160        'views_animated.gyp:views_animated',
161        'xml.gyp:xml',
162      ],
163      'msvs_settings': {
164        'VCLinkerTool': {
165          #Allows for creation / output to console.
166          #Console (/SUBSYSTEM:CONSOLE)
167          'SubSystem': '1',
168
169          #Console app, use main/wmain
170          'EntryPointSymbol': 'mainCRTStartup',
171        },
172      },
173      'conditions' : [
174        [ 'skia_os == "ios"', {
175          'mac_bundle' : 1,
176          # TODO: This doesn't build properly yet, but it's getting there.
177          'sources': [
178            '../src/views/mac/SkEventNotifier.mm',
179            '../experimental/iOSSampleApp/SkSampleUIView.mm',
180            '../experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig',
181            '../experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig',
182            '../experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig',
183            '../experimental/iOSSampleApp/iOSSampleApp-Info.plist',
184            '../experimental/iOSSampleApp/Shared/SkOptionListController.mm',
185            '../experimental/iOSSampleApp/Shared/SkUIRootViewController.mm',
186            '../experimental/iOSSampleApp/Shared/SkOptionsTableViewController.mm',
187            '../experimental/iOSSampleApp/Shared/SkUIView.mm',
188            '../experimental/iOSSampleApp/Shared/SkUIDetailViewController.mm',
189            '../experimental/iOSSampleApp/Shared/skia_ios.mm',
190
191            # iPad
192            '../experimental/iOSSampleApp/iPad/AppDelegate_iPad.mm',
193            '../experimental/iOSSampleApp/iPad/SkUISplitViewController.mm',
194
195            # iPhone
196            '../experimental/iOSSampleApp/iPhone/AppDelegate_iPhone.mm',
197            '../experimental/iOSSampleApp/iPhone/SkUINavigationController.mm',
198
199            '../src/views/ios/SkOSWindow_iOS.mm',
200
201            '../src/utils/mac/SkCreateCGImageRef.cpp',
202            '../experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig',
203            '../experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig',
204          ],
205          'link_settings': {
206            'libraries': [
207              '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
208              '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
209              '$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
210              '$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
211              '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
212              '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
213              '$(SDKROOT)/System/Library/Frameworks/OpenGLES.framework',
214              '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework',
215              '$(SDKROOT)/System/Library/Frameworks/MobileCoreServices.framework',
216            ],
217          },
218          'include_dirs' : [
219            '../experimental/iOSSampleApp',
220            '../experimental/iOSSampleApp/iPad',
221            '../experimental/iOSSampleApp/iPhone',
222            '../experimental/iOSSampleApp/Shared',
223            '../include/utils/ios',
224            '../src/views/mac',
225          ],
226          'xcode_settings' : {
227            'INFOPLIST_FILE' : '../experimental/iOSSampleApp/iOSSampleApp-Info.plist',
228          },
229          'xcode_config_file': '../experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig',
230          'mac_bundle_resources' : [
231            '../experimental/iOSSampleApp/iPad/MainWindow_iPad.xib',
232            '../experimental/iOSSampleApp/iPhone/MainWindow_iPhone.xib',
233          ],
234        }],
235        [ 'skia_os == "android"', {
236          'sources!': [
237            '../samplecode/SampleAnimator.cpp',
238          ],
239          'conditions': [
240            ['skia_android_framework == 0', {
241              'dependencies': [
242                'android_deps.gyp:Android_EntryPoint',
243                'skia_launcher.gyp:skia_launcher',
244              ],
245            }],
246          ],
247          'dependencies!': [
248            'animator.gyp:animator',
249            'experimental.gyp:experimental',
250          ],
251          'dependencies': [
252            'android_output.gyp:android_output',
253            'android_deps.gyp:Android_SampleApp',
254          ],
255        }],
256        [ 'skia_os == "chromeos"', {
257          'sources!': [
258            '../samplecode/SampleLighting.cpp',  #doesn't compile due to gpu dependencies
259          ],
260          'include_dirs' : [
261            '../include/gpu',
262          ],
263        }],
264        [ 'skia_gpu == 1', {
265          'dependencies': [
266            'gputest.gyp:skgputest',
267          ],
268        }],
269        [ 'not skia_pdf', {
270          'dependencies!': [ 'pdf.gyp:pdf' ],
271          'dependencies': [ 'pdf.gyp:nopdf' ],
272        }],
273      ],
274    },
275  ],
276}
277