Home | History | Annotate | Download | only in gyp
      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   'variables': {
      8     #manually set sample_pdf_file_viewer to 1 to have the PdfViewer in SampleApp
      9     'sample_pdf_file_viewer%': 0,
     10   },
     11   'targets': [
     12     {
     13       'target_name': 'SampleApp',
     14       'type': 'executable',
     15       'mac_bundle' : 1,
     16       'include_dirs' : [
     17         '../src/core',
     18         '../src/effects', #needed for BlurMask.h
     19         '../src/gpu', # needed by SkLua.cpp
     20         '../src/images',
     21         '../src/lazy',
     22         '../gm',       # needed to pull gm.h
     23         '../samplecode', # To pull SampleApp.h and SampleCode.h
     24         '../src/pipe/utils', # For TiledPipeController
     25         '../src/utils/debugger',
     26       ],
     27       'includes': [
     28         'gmslides.gypi',
     29       ],
     30       'sources': [
     31         '../gm/gm.cpp',
     32         '../samplecode/GMSampleView.h',
     33         '../samplecode/GMSampleView.cpp',
     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/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/SampleCull.cpp',
     61         '../samplecode/SampleDegenerateTwoPtRadials.cpp',
     62         '../samplecode/SampleDither.cpp',
     63         '../samplecode/SampleDitherBitmap.cpp',
     64         '../samplecode/SampleEffects.cpp',
     65         '../samplecode/SampleEmboss.cpp',
     66         '../samplecode/SampleEmptyPath.cpp',
     67         '../samplecode/SampleEncode.cpp',
     68         '../samplecode/SampleFatBits.cpp',
     69         '../samplecode/SampleFillType.cpp',
     70         '../samplecode/SampleFilter.cpp',
     71         '../samplecode/SampleFilter2.cpp',
     72         '../samplecode/SampleFilterQuality.cpp',
     73         '../samplecode/SampleFilterFuzz.cpp',
     74         '../samplecode/SampleFontCache.cpp',
     75         '../samplecode/SampleFontScalerTest.cpp',
     76         '../samplecode/SampleFuzz.cpp',
     77         '../samplecode/SampleGradients.cpp',
     78         '../samplecode/SampleHairCurves.cpp',
     79         '../samplecode/SampleHairline.cpp',
     80         '../samplecode/SampleHairModes.cpp',
     81         '../samplecode/SampleHT.cpp',
     82         '../samplecode/SampleIdentityScale.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/SamplePatch.cpp',
     91         '../samplecode/SamplePath.cpp',
     92         '../samplecode/SamplePathClip.cpp',
     93         '../samplecode/SamplePathFuzz.cpp',
     94         '../samplecode/SamplePathEffects.cpp',
     95         '../samplecode/SamplePicture.cpp',
     96         '../samplecode/SamplePictFile.cpp',
     97         '../samplecode/SamplePoints.cpp',
     98         '../samplecode/SamplePolyToPoly.cpp',
     99         '../samplecode/SampleQuadStroker.cpp',
    100         '../samplecode/SampleRectanizer.cpp',
    101         '../samplecode/SampleRegion.cpp',
    102         '../samplecode/SampleRepeatTile.cpp',
    103         '../samplecode/SampleShaders.cpp',
    104         '../samplecode/SampleShaderText.cpp',
    105         '../samplecode/SampleSkLayer.cpp',
    106         '../samplecode/SampleSlides.cpp',
    107         '../samplecode/SampleStringArt.cpp',
    108         '../samplecode/SampleStrokePath.cpp',
    109         '../samplecode/SampleSubpixelTranslate.cpp',
    110         '../samplecode/SampleText.cpp',
    111         '../samplecode/SampleTextAlpha.cpp',
    112         '../samplecode/SampleTextBox.cpp',
    113         '../samplecode/SampleTextOnPath.cpp',
    114         '../samplecode/SampleTextureDomain.cpp',
    115         '../samplecode/SampleTiling.cpp',
    116         '../samplecode/SampleTinyBitmap.cpp',
    117         '../samplecode/SampleUnpremul.cpp',
    118         '../samplecode/SampleVertices.cpp',
    119         '../samplecode/SampleXfermodesBlur.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         # 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/SampleFontCache.cpp',
    145       ],
    146       'dependencies': [
    147         'animator.gyp:animator',
    148         'etc1.gyp:libetc1',
    149         'experimental.gyp:experimental',
    150         'flags.gyp:flags',
    151         'lua.gyp:lua',
    152         'pdf.gyp:pdf',
    153         'skia_lib.gyp:skia_lib',
    154         'tools.gyp:resources',
    155         'tools.gyp:sk_tool_utils',
    156         'views.gyp:views',
    157         'views_animated.gyp:views_animated',
    158         'xml.gyp:xml',
    159       ],
    160      'conditions' : [
    161        [ 'sample_pdf_file_viewer == 1', {
    162          'defines': [
    163            'SAMPLE_PDF_FILE_VIEWER',
    164          ],
    165          'dependencies': [
    166            'pdfviewer_lib.gyp:pdfviewer_lib',
    167          ],
    168          'include_dirs' : [
    169            '../experimental/PdfViewer/inc',
    170          ],
    171          'sources': [
    172            '../samplecode/SamplePdfFileViewer.cpp',
    173          ]
    174        }],
    175         [ 'skia_os == "win"', {
    176           'sources!': [
    177             # require UNIX functions
    178             '../samplecode/SampleEncode.cpp',
    179           ],
    180         }],
    181         [ 'skia_os == "mac"', {
    182           'sources': [
    183             # Sample App specific files
    184             '../src/views/mac/SampleApp-Info.plist',
    185             '../src/views/mac/SampleAppDelegate.h',
    186             '../src/views/mac/SampleAppDelegate.mm',
    187             '../src/views/mac/SkSampleNSView.h',
    188             '../src/views/mac/SkSampleNSView.mm',
    189 
    190             # Mac files
    191             '../src/views/mac/SkEventNotifier.h',
    192             '../src/views/mac/SkEventNotifier.mm',
    193             '../src/views/mac/skia_mac.mm',
    194             '../src/views/mac/SkNSView.h',
    195             '../src/views/mac/SkNSView.mm',
    196             '../src/views/mac/SkOptionsTableView.h',
    197             '../src/views/mac/SkOptionsTableView.mm',
    198             '../src/views/mac/SkOSWindow_Mac.mm',
    199             '../src/views/mac/SkTextFieldCell.h',
    200             '../src/views/mac/SkTextFieldCell.m',
    201           ],
    202           'libraries': [
    203             '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
    204             '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
    205           ],
    206           'xcode_settings' : {
    207             'INFOPLIST_FILE' : '../src/views/mac/SampleApp-Info.plist',
    208           },
    209           'mac_bundle_resources' : [
    210             '../src/views/mac/SampleApp.xib',
    211           ],
    212         }],
    213         [ 'skia_os == "ios"', {
    214           # TODO: This doesn't build properly yet, but it's getting there.
    215           'sources!': [
    216             '../samplecode/SampleDecode.cpp',
    217             '../experimental/SimpleiOSApp/SimpleApp.mm',
    218           ],
    219           'sources': [
    220             '../src/views/mac/SkEventNotifier.mm',
    221             '../experimental/iOSSampleApp/SkSampleUIView.mm',
    222             '../experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig',
    223             '../experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig',
    224             '../experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig',
    225             '../experimental/iOSSampleApp/iOSSampleApp-Info.plist',
    226             '../experimental/iOSSampleApp/Shared/SkOptionListController.mm',
    227             '../experimental/iOSSampleApp/Shared/SkUIRootViewController.mm',
    228             '../experimental/iOSSampleApp/Shared/SkOptionsTableViewController.mm',
    229             '../experimental/iOSSampleApp/Shared/SkUIView.mm',
    230             '../experimental/iOSSampleApp/Shared/SkUIDetailViewController.mm',
    231             '../experimental/iOSSampleApp/Shared/skia_ios.mm',
    232 
    233             # iPad
    234             '../experimental/iOSSampleApp/iPad/AppDelegate_iPad.mm',
    235             '../experimental/iOSSampleApp/iPad/SkUISplitViewController.mm',
    236             '../experimental/iOSSampleApp/iPad/MainWindow_iPad.xib',
    237 
    238             # iPhone
    239             '../experimental/iOSSampleApp/iPhone/AppDelegate_iPhone.mm',
    240             '../experimental/iOSSampleApp/iPhone/SkUINavigationController.mm',
    241             '../experimental/iOSSampleApp/iPhone/MainWindow_iPhone.xib',
    242 
    243             '../src/views/ios/SkOSWindow_iOS.mm',
    244             '../src/utils/ios/SkStream_NSData.mm',
    245             # Not fully implemented yet
    246             # '../src/utils/ios/SkOSFile_iOS.mm',
    247 
    248             '../src/utils/mac/SkCreateCGImageRef.cpp',
    249             '../experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig',
    250             '../experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig',
    251           ],
    252           'link_settings': {
    253             'libraries': [
    254               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
    255               '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
    256               '$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
    257               '$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
    258               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
    259               '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
    260               '$(SDKROOT)/System/Library/Frameworks/OpenGLES.framework',
    261               '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework',
    262               '$(SDKROOT)/System/Library/Frameworks/MobileCoreServices.framework',
    263             ],
    264           },
    265           'include_dirs' : [
    266             '../experimental/iOSSampleApp',
    267             '../experimental/iOSSampleApp/iPad',
    268             '../experimental/iOSSampleApp/iPhone',
    269             '../experimental/iOSSampleApp/Shared',
    270             '../include/utils/ios',
    271             '../src/views/mac',
    272           ],
    273           'xcode_settings' : {
    274             'INFOPLIST_FILE' : '../experimental/iOSSampleApp/iOSSampleApp-Info.plist',
    275           },
    276           'xcode_config_file': '../experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig',
    277           'mac_bundle_resources' : [
    278             '../experimental/iOSSampleApp/iPad/MainWindow_iPad.xib',
    279             '../experimental/iOSSampleApp/iPhone/MainWindow_iPhone.xib',
    280           ],
    281         }],
    282         [ 'skia_os == "android"', {
    283           'sources!': [
    284             '../samplecode/SampleAnimator.cpp',
    285           ],
    286           'dependencies!': [
    287             'animator.gyp:animator',
    288             'experimental.gyp:experimental',
    289           ],
    290           'dependencies': [
    291             'android_deps.gyp:Android_SampleApp',
    292           ],
    293         }],
    294         [ 'skia_gpu == 1', {
    295           'dependencies': [
    296             'gputest.gyp:skgputest',
    297           ],
    298         }],
    299       ],
    300       'msvs_settings': {
    301         'VCLinkerTool': {
    302           'SubSystem': '2',
    303         },
    304       },
    305     },
    306   ],
    307 }
    308