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