1 # 2 { 3 'variables': { 4 #manually set sample_pdf_file_viewer to 1 to have the PdfViewer in SampleApp 5 'sample_pdf_file_viewer%': 0, 6 }, 7 'targets': [ 8 { 9 'target_name': 'SampleApp', 10 'type': 'executable', 11 'mac_bundle' : 1, 12 'include_dirs' : [ 13 '../src/core', 14 '../src/effects', #needed for BlurMask.h 15 '../src/images', 16 '../src/lazy', 17 '../gm', # needed to pull gm.h 18 '../samplecode', # To pull SampleApp.h and SampleCode.h 19 '../src/pipe/utils', # For TiledPipeController 20 '../src/utils/debugger', 21 ], 22 'includes': [ 23 'gmslides.gypi', 24 ], 25 'sources': [ 26 '../src/utils/debugger/SkDrawCommand.h', 27 '../src/utils/debugger/SkDrawCommand.cpp', 28 '../src/utils/debugger/SkDebugCanvas.h', 29 '../src/utils/debugger/SkDebugCanvas.cpp', 30 '../src/utils/debugger/SkObjectParser.h', 31 '../src/utils/debugger/SkObjectParser.cpp', 32 33 '../gm/gm.cpp', 34 '../gm/gm.h', 35 36 '../samplecode/GMSampleView.h', 37 '../samplecode/ClockFaceView.cpp', 38 '../samplecode/OverView.cpp', 39 '../samplecode/OverView.h', 40 '../samplecode/Sample2PtRadial.cpp', 41 '../samplecode/SampleAAClip.cpp', 42 '../samplecode/SampleAARects.cpp', 43 '../samplecode/SampleAARectModes.cpp', 44 '../samplecode/SampleAll.cpp', 45 '../samplecode/SampleAnimator.cpp', 46 '../samplecode/SampleAnimBlur.cpp', 47 '../samplecode/SampleApp.cpp', 48 '../samplecode/SampleArc.cpp', 49 '../samplecode/SampleAvoid.cpp', 50 '../samplecode/SampleBigBlur.cpp', 51 '../samplecode/SampleBigGradient.cpp', 52 '../samplecode/SampleBitmapRect.cpp', 53 '../samplecode/SampleBlur.cpp', 54 '../samplecode/SampleCamera.cpp', 55 '../samplecode/SampleChart.cpp', 56 '../samplecode/SampleCircle.cpp', 57 '../samplecode/SampleClock.cpp', 58 '../samplecode/SampleClip.cpp', 59 '../samplecode/SampleCode.h', 60 '../samplecode/SampleColorFilter.cpp', 61 '../samplecode/SampleComplexClip.cpp', 62 '../samplecode/SampleConcavePaths.cpp', 63 '../samplecode/SampleCull.cpp', 64 '../samplecode/SampleDegenerateTwoPtRadials.cpp', 65 '../samplecode/SampleDither.cpp', 66 '../samplecode/SampleDitherBitmap.cpp', 67 '../samplecode/SampleEffects.cpp', 68 '../samplecode/SampleEmboss.cpp', 69 '../samplecode/SampleEmptyPath.cpp', 70 '../samplecode/SampleEncode.cpp', 71 '../samplecode/SampleFatBits.cpp', 72 '../samplecode/SampleFillType.cpp', 73 '../samplecode/SampleFilter.cpp', 74 '../samplecode/SampleFilter2.cpp', 75 '../samplecode/SampleFilterFuzz.cpp', 76 '../samplecode/SampleFontCache.cpp', 77 '../samplecode/SampleFontScalerTest.cpp', 78 '../samplecode/SampleFuzz.cpp', 79 '../samplecode/SampleGradients.cpp', 80 '../samplecode/SampleHairCurves.cpp', 81 '../samplecode/SampleHairline.cpp', 82 '../samplecode/SampleHairModes.cpp', 83 '../samplecode/SampleLayerMask.cpp', 84 '../samplecode/SampleLayers.cpp', 85 '../samplecode/SampleLCD.cpp', 86 '../samplecode/SampleLines.cpp', 87 '../samplecode/SampleLua.cpp', 88 '../samplecode/SampleManyRects.cpp', 89 '../samplecode/SampleMeasure.cpp', 90 '../samplecode/SampleMipMap.cpp', 91 '../samplecode/SampleMovie.cpp', 92 '../samplecode/SampleOvalTest.cpp', 93 '../samplecode/SampleOverflow.cpp', 94 '../samplecode/SamplePatch.cpp', 95 '../samplecode/SamplePath.cpp', 96 '../samplecode/SamplePathClip.cpp', 97 '../samplecode/SamplePathUtils.cpp', 98 '../samplecode/SamplePathEffects.cpp', 99 '../samplecode/SamplePicture.cpp', 100 '../samplecode/SamplePictFile.cpp', 101 '../samplecode/SamplePoints.cpp', 102 '../samplecode/SamplePolyToPoly.cpp', 103 '../samplecode/SampleRegion.cpp', 104 '../samplecode/SampleRepeatTile.cpp', 105 '../samplecode/SampleRotateCircles.cpp', 106 '../samplecode/SampleShaders.cpp', 107 '../samplecode/SampleShaderText.cpp', 108 '../samplecode/SampleSkLayer.cpp', 109 '../samplecode/SampleSlides.cpp', 110 '../samplecode/SampleStringArt.cpp', 111 '../samplecode/SampleStrokePath.cpp', 112 '../samplecode/SampleTests.cpp', 113 '../samplecode/SampleText.cpp', 114 '../samplecode/SampleTextAlpha.cpp', 115 '../samplecode/SampleTextBox.cpp', 116 '../samplecode/SampleTextOnPath.cpp', 117 '../samplecode/SampleTextureDomain.cpp', 118 '../samplecode/SampleTiling.cpp', 119 '../samplecode/SampleTinyBitmap.cpp', 120 '../samplecode/SampleUnitMapper.cpp', 121 '../samplecode/SampleUnpremul.cpp', 122 '../samplecode/SampleVertices.cpp', 123 '../samplecode/SampleXfermodesBlur.cpp', 124 '../samplecode/TransitionView.cpp', 125 '../samplecode/TransitionView.h', 126 127 # DrawingBoard 128 #'../experimental/DrawingBoard/SkColorPalette.h', 129 #'../experimental/DrawingBoard/SkColorPalette.cpp', 130 #'../experimental/DrawingBoard/SkNetPipeController.h', 131 #'../experimental/DrawingBoard/SkNetPipeController.cpp', 132 #'../experimental/DrawingBoard/SampleDrawingClient.cpp', 133 #'../experimental/DrawingBoard/SampleDrawingServer.cpp', 134 135 # Networking 136 #'../experimental/Networking/SampleNetPipeReader.cpp', 137 #'../experimental/Networking/SkSockets.cpp', 138 #'../experimental/Networking/SkSockets.h', 139 140 # TiledPipeController 141 '../src/pipe/utils/SamplePipeControllers.h', 142 '../src/pipe/utils/SamplePipeControllers.cpp', 143 144 # Lua 145 '../src/utils/SkLuaCanvas.cpp', 146 '../src/utils/SkLua.cpp', 147 ], 148 'sources!': [ 149 '../samplecode/SampleSkLayer.cpp', #relies on SkMatrix44 which doesn't compile 150 '../samplecode/SampleTests.cpp', #includes unknown file SkShaderExtras.h 151 '../samplecode/SampleWarp.cpp', 152 '../samplecode/SampleFontCache.cpp', 153 ], 154 'dependencies': [ 155 'skia_lib.gyp:skia_lib', 156 'views.gyp:views', 157 'animator.gyp:animator', 158 'xml.gyp:xml', 159 'experimental.gyp:experimental', 160 'pdf.gyp:pdf', 161 'views_animated.gyp:views_animated', 162 'lua.gyp:lua', 163 ], 164 'conditions' : [ 165 [ 'sample_pdf_file_viewer == 1', { 166 'defines': [ 167 'SAMPLE_PDF_FILE_VIEWER', 168 ], 169 'dependencies': [ 170 'pdfviewer_lib.gyp:pdfviewer_lib', 171 ], 172 'include_dirs' : [ 173 '../experimental/PdfViewer/inc', 174 ], 175 'sources': [ 176 '../samplecode/SamplePdfFileViewer.cpp', 177 ] 178 }], 179 [ 'skia_os == "win"', { 180 'sources!': [ 181 # require UNIX functions 182 '../samplecode/SampleEncode.cpp', 183 ], 184 }], 185 [ 'skia_os == "mac"', { 186 'sources': [ 187 # Sample App specific files 188 '../src/views/mac/SampleApp-Info.plist', 189 '../src/views/mac/SampleAppDelegate.h', 190 '../src/views/mac/SampleAppDelegate.mm', 191 '../src/views/mac/SkSampleNSView.h', 192 '../src/views/mac/SkSampleNSView.mm', 193 194 # Mac files 195 '../src/views/mac/SkEventNotifier.h', 196 '../src/views/mac/SkEventNotifier.mm', 197 '../src/views/mac/skia_mac.mm', 198 '../src/views/mac/SkNSView.h', 199 '../src/views/mac/SkNSView.mm', 200 '../src/views/mac/SkOptionsTableView.h', 201 '../src/views/mac/SkOptionsTableView.mm', 202 '../src/views/mac/SkOSWindow_Mac.mm', 203 '../src/views/mac/SkTextFieldCell.h', 204 '../src/views/mac/SkTextFieldCell.m', 205 ], 206 'libraries': [ 207 '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework', 208 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', 209 ], 210 'xcode_settings' : { 211 'INFOPLIST_FILE' : '../src/views/mac/SampleApp-Info.plist', 212 }, 213 'mac_bundle_resources' : [ 214 '../src/views/mac/SampleApp.xib', 215 ], 216 }], 217 [ 'skia_os == "ios"', { 218 # TODO: This doesn't build properly yet, but it's getting there. 219 'sources!': [ 220 '../samplecode/SampleDecode.cpp', 221 ], 222 'sources': [ 223 '../src/views/mac/SkEventNotifier.h', 224 '../src/views/mac/SkEventNotifier.mm', 225 '../experimental/iOSSampleApp/SkSampleUIView.h', 226 '../experimental/iOSSampleApp/SkSampleUIView.mm', 227 '../experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig', 228 '../experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig', 229 '../experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig', 230 '../experimental/iOSSampleApp/iOSSampleApp-Info.plist', 231 '../experimental/iOSSampleApp/Shared/SkOptionListController.h', 232 '../experimental/iOSSampleApp/Shared/SkOptionListController.mm', 233 '../experimental/iOSSampleApp/Shared/SkUIRootViewController.h', 234 '../experimental/iOSSampleApp/Shared/SkUIRootViewController.mm', 235 '../experimental/iOSSampleApp/Shared/SkOptionsTableViewController.h', 236 '../experimental/iOSSampleApp/Shared/SkOptionsTableViewController.mm', 237 '../experimental/iOSSampleApp/Shared/SkUIView.h', 238 '../experimental/iOSSampleApp/Shared/SkUIView.mm', 239 '../experimental/iOSSampleApp/Shared/SkUIDetailViewController.h', 240 '../experimental/iOSSampleApp/Shared/SkUIDetailViewController.mm', 241 '../experimental/iOSSampleApp/Shared/skia_ios.mm', 242 243 # iPad 244 '../experimental/iOSSampleApp/iPad/AppDelegate_iPad.h', 245 '../experimental/iOSSampleApp/iPad/AppDelegate_iPad.mm', 246 '../experimental/iOSSampleApp/iPad/SkUISplitViewController.h', 247 '../experimental/iOSSampleApp/iPad/SkUISplitViewController.mm', 248 '../experimental/iOSSampleApp/iPad/MainWindow_iPad.xib', 249 250 # iPhone 251 '../experimental/iOSSampleApp/iPhone/AppDelegate_iPhone.h', 252 '../experimental/iOSSampleApp/iPhone/AppDelegate_iPhone.mm', 253 '../experimental/iOSSampleApp/iPhone/SkUINavigationController.h', 254 '../experimental/iOSSampleApp/iPhone/SkUINavigationController.mm', 255 '../experimental/iOSSampleApp/iPhone/MainWindow_iPhone.xib', 256 257 '../src/views/ios/SkOSWindow_iOS.mm', 258 '../src/utils/ios/SkImageDecoder_iOS.mm', 259 '../src/utils/ios/SkStream_NSData.mm', 260 '../src/utils/ios/SkOSFile_iOS.mm', 261 262 '../include/utils/mac/SkCGUtils.h', 263 '../src/utils/mac/SkCreateCGImageRef.cpp', 264 '../experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig', 265 '../experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig', 266 ], 267 'link_settings': { 268 'libraries': [ 269 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', 270 '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework', 271 '$(SDKROOT)/System/Library/Frameworks/CoreText.framework', 272 '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', 273 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', 274 '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework', 275 '$(SDKROOT)/System/Library/Frameworks/OpenGLES.framework', 276 '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework', 277 '$(SDKROOT)/System/Library/Frameworks/MobileCoreServices.framework', 278 ], 279 }, 280 'include_dirs' : [ 281 '../experimental/iOSSampleApp', 282 '../experimental/iOSSampleApp/iPad', 283 '../experimental/iOSSampleApp/iPhone', 284 '../include/utils/ios', 285 ], 286 'xcode_settings' : { 287 'INFOPLIST_FILE' : '../experimental/iOSSampleApp/iOSSampleApp-Info.plist', 288 }, 289 'xcode_config_file': '../experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig', 290 'mac_bundle_resources' : [ 291 '../experimental/iOSSampleApp/iPad/MainWindow_iPad.xib', 292 '../experimental/iOSSampleApp/iPhone/MainWindow_iPhone.xib', 293 ], 294 }], 295 [ 'skia_os == "android"', { 296 'sources!': [ 297 '../samplecode/SampleAnimator.cpp', 298 '../samplecode/SampleUnitMapper.cpp', 299 ], 300 'dependencies!': [ 301 'animator.gyp:animator', 302 'experimental.gyp:experimental', 303 ], 304 'dependencies': [ 305 'android_deps.gyp:Android_SampleApp', 306 ], 307 }], 308 [ 'skia_gpu == 1', { 309 'dependencies': [ 310 'gputest.gyp:skgputest', 311 ], 312 }], 313 [ 'skia_os == "nacl"', { 314 'sources': [ 315 '../../nacl/src/nacl_sample.cpp', 316 ], 317 }], 318 ], 319 'msvs_settings': { 320 'VCLinkerTool': { 321 'SubSystem': '2', 322 }, 323 }, 324 }, 325 ], 326 } 327