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