Home | History | Annotate | Download | only in gyp
      1 # GYP file to build performance testbench.
      2 #
      3 {
      4   'includes': [
      5     'apptype_console.gypi',
      6   ],
      7   'targets': [
      8     {
      9       'target_name': 'bench',
     10       'type': 'executable',
     11       'dependencies': [
     12         'bench_timer',
     13         'crash_handler.gyp:CrashHandler',
     14         'etc1.gyp:libetc1',
     15         'flags.gyp:flags',
     16         'jsoncpp.gyp:jsoncpp',
     17         'resources.gyp:resources',
     18         'skia_lib.gyp:skia_lib',
     19       ],
     20       'sources': [
     21         '../bench/BenchLogger.cpp',
     22         '../bench/BenchLogger.h',
     23         '../bench/GMBench.cpp',
     24         '../bench/GMBench.h',
     25         '../bench/ResultsWriter.cpp',
     26         '../bench/benchmain.cpp',
     27         '../tools/sk_tool_utils.cpp',
     28       ],
     29       'conditions': [
     30         ['skia_gpu == 1',
     31           {
     32             'include_dirs' : [
     33               '../src/gpu',
     34             ],
     35             'dependencies': [
     36               'gputest.gyp:skgputest',
     37             ],
     38           },
     39         ],
     40         ['skia_android_framework == 1',
     41           {
     42             'libraries': [
     43               '-lskia',
     44             ],
     45           },
     46         ],
     47       ],
     48       'includes': [
     49         'bench.gypi',
     50         'gmslides.gypi',
     51       ],
     52     },
     53     {
     54       'target_name' : 'bench_timer',
     55       'type': 'static_library',
     56       'sources': [
     57         '../bench/BenchTimer.h',
     58         '../bench/BenchTimer.cpp',
     59         '../bench/BenchSysTimer_mach.h',
     60         '../bench/BenchSysTimer_mach.cpp',
     61         '../bench/BenchSysTimer_posix.h',
     62         '../bench/BenchSysTimer_posix.cpp',
     63         '../bench/BenchSysTimer_windows.h',
     64         '../bench/BenchSysTimer_windows.cpp',
     65       ],
     66       'include_dirs': [
     67         '../src/core',
     68         '../src/gpu',
     69         '../tools',
     70       ],
     71       'direct_dependent_settings': {
     72         'include_dirs': ['../bench'],
     73       },
     74       'dependencies': [
     75         'skia_lib.gyp:skia_lib',
     76       ],
     77       'conditions': [
     78         [ 'skia_os not in ["mac", "ios"]', {
     79           'sources!': [
     80             '../bench/BenchSysTimer_mach.h',
     81             '../bench/BenchSysTimer_mach.cpp',
     82           ],
     83         }],
     84         [ 'skia_os not in ["linux", "freebsd", "openbsd", "solaris", "android", "chromeos"]', {
     85           'sources!': [
     86             '../bench/BenchSysTimer_posix.h',
     87             '../bench/BenchSysTimer_posix.cpp',
     88           ],
     89         }],
     90         [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
     91           'link_settings': {
     92             'libraries': [
     93               '-lrt',
     94             ],
     95           },
     96         }],
     97         [ 'skia_os != "win"', {
     98           'sources!': [
     99             '../bench/BenchSysTimer_windows.h',
    100             '../bench/BenchSysTimer_windows.cpp',
    101           ],
    102         }],
    103         ['skia_gpu == 1', {
    104           'sources': [
    105             '../bench/BenchGpuTimer_gl.h',
    106             '../bench/BenchGpuTimer_gl.cpp',
    107           ],
    108         }],
    109       ],
    110     }
    111   ],
    112 }
    113