Home | History | Annotate | Download | only in gyp
      1 # Port-specific Skia library code.
      2 {
      3   'targets': [
      4     {
      5       'target_name': 'ports',
      6       'product_name': 'skia_ports',
      7       'type': 'static_library',
      8       'standalone_static_library': 1,
      9       'dependencies': [
     10         'core.gyp:*',
     11       ],
     12       'include_dirs': [
     13         '../include/effects',
     14         '../include/images',
     15         '../include/ports',
     16         '../include/utils',
     17         '../include/utils/win',
     18         '../include/xml',
     19         '../src/core',
     20         '../src/lazy',
     21         '../src/ports',
     22         '../src/sfnt',
     23         '../src/utils',
     24       ],
     25       'sources': [
     26         '../src/ports/SkDebug_nacl.cpp',
     27         '../src/ports/SkDebug_stdio.cpp',
     28         '../src/ports/SkDebug_win.cpp',
     29 
     30         '../src/ports/SkFontHost_win.cpp',
     31         '../src/ports/SkFontHost_win_dw.cpp',
     32         '../src/ports/SkFontMgr_default_gdi.cpp',
     33         '../src/ports/SkFontMgr_default_dw.cpp',
     34 
     35         '../src/ports/SkGlobalInitialization_default.cpp',
     36         '../src/ports/SkMemory_malloc.cpp',
     37         '../src/ports/SkOSFile_posix.cpp',
     38         '../src/ports/SkOSFile_stdio.cpp',
     39         '../src/ports/SkOSFile_win.cpp',
     40         '../src/ports/SkDiscardableMemory_none.cpp',
     41         '../src/ports/SkPurgeableMemoryBlock_none.cpp',
     42        #'../src/ports/SkThread_none.cpp',
     43         '../src/ports/SkThread_pthread.cpp',
     44         '../src/ports/SkThread_win.cpp',
     45         '../src/ports/SkTime_Unix.cpp',
     46         '../src/ports/SkTime_win.cpp',
     47        #'../src/ports/SkTLS_none.cpp',
     48         '../src/ports/SkTLS_pthread.cpp',
     49         '../src/ports/SkTLS_win.cpp',
     50         '../src/ports/SkXMLParser_empty.cpp',
     51       ],
     52       'conditions': [
     53         [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos", "nacl", "android"]', {
     54           'sources': [
     55             '../src/ports/SkFontHost_FreeType.cpp',
     56             '../src/ports/SkFontHost_FreeType_common.cpp',
     57           ],
     58           'dependencies': [
     59             'freetype.gyp:freetype',
     60           ],
     61         }],
     62         [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
     63           'link_settings': {
     64             'libraries': [
     65               '-lfontconfig',
     66               '-ldl',
     67             ],
     68           },
     69           'sources': [
     70             '../src/fonts/SkFontMgr_fontconfig.cpp',
     71             '../src/ports/SkFontHost_fontconfig.cpp',
     72             '../src/ports/SkFontConfigInterface_direct.cpp',
     73           ],
     74         }],
     75         [ 'skia_os == "nacl"', {
     76           'sources': [
     77             '../src/ports/SkFontHost_linux.cpp',
     78           ],
     79           'sources!': [
     80             '../src/ports/SkDebug_stdio.cpp',
     81           ],
     82         }, {
     83           'sources!': [
     84             '../src/ports/SkDebug_nacl.cpp',
     85           ],
     86         }],
     87         [ 'skia_os == "mac"', {
     88           'include_dirs': [
     89             '../include/utils/mac',
     90           ],
     91           'sources': [
     92             '../src/ports/SkFontHost_mac.cpp',
     93             '../src/ports/SkPurgeableMemoryBlock_mac.cpp',
     94             '../src/utils/mac/SkStream_mac.cpp',
     95           ],
     96           'sources!': [
     97             '../src/ports/SkPurgeableMemoryBlock_none.cpp',
     98             '../src/ports/SkFontHost_tables.cpp',
     99           ],
    100         }],
    101         [ 'skia_os == "ios"', {
    102           'include_dirs': [
    103             '../include/utils/ios',
    104             '../include/utils/mac',
    105           ],
    106           'sources': [
    107             '../src/ports/SkFontHost_mac.cpp',
    108             '../src/ports/SkPurgeableMemoryBlock_mac.cpp',
    109             '../src/utils/mac/SkStream_mac.cpp',
    110           ],
    111           'sources!': [
    112             '../src/ports/SkPurgeableMemoryBlock_none.cpp',
    113             '../src/ports/SkFontHost_tables.cpp',
    114           ],
    115         }],
    116         [ 'skia_os == "win"', {
    117           'include_dirs': [
    118             'config/win',
    119             '../src/utils/win',
    120           ],
    121           'sources!': [ # these are used everywhere but windows
    122             '../src/ports/SkDebug_stdio.cpp',
    123             '../src/ports/SkOSFile_posix.cpp',
    124             '../src/ports/SkThread_pthread.cpp',
    125             '../src/ports/SkTime_Unix.cpp',
    126             '../src/ports/SkTLS_pthread.cpp',
    127           ],
    128           'conditions': [
    129             #    when we build for win, we only want one of these default files
    130             [ 'skia_directwrite', {
    131               'sources!': [
    132                 '../src/ports/SkFontMgr_default_gdi.cpp',
    133               ],
    134             }, { # else gdi
    135               'sources!': [
    136                 '../src/ports/SkFontMgr_default_dw.cpp',
    137               ],
    138             }],
    139           ],
    140         }, { # else !win
    141           'sources!': [
    142             '../src/ports/SkDebug_win.cpp',
    143             '../src/ports/SkFontHost_win.cpp',
    144             '../src/ports/SkFontHost_win_dw.cpp',
    145             '../src/ports/SkFontMgr_default_gdi.cpp',
    146             '../src/ports/SkFontMgr_default_dw.cpp',
    147             '../src/ports/SkOSFile_win.cpp',
    148             '../src/ports/SkThread_win.cpp',
    149             '../src/ports/SkTime_win.cpp',
    150             '../src/ports/SkTLS_win.cpp',
    151           ],
    152         }],
    153         [ 'skia_os == "android"', {
    154           'sources!': [
    155             '../src/ports/SkDebug_stdio.cpp',
    156             '../src/ports/SkDiscardableMemory_none.cpp',
    157             '../src/ports/SkPurgeableMemoryBlock_none.cpp',
    158           ],
    159           'sources': [
    160             '../src/ports/SkDebug_android.cpp',
    161             '../src/ports/SkDiscardableMemory_ashmem.cpp',
    162             '../src/ports/SkFontConfigInterface_android.cpp',
    163             '../src/ports/SkFontConfigParser_android.cpp',
    164             '../src/ports/SkFontHost_fontconfig.cpp',
    165             '../src/ports/SkPurgeableMemoryBlock_android.cpp',
    166           ],
    167           'dependencies': [
    168              'android_deps.gyp:expat',
    169           ],
    170         }],
    171       ],
    172       'direct_dependent_settings': {
    173         'include_dirs': [
    174           '../include/ports',
    175         ],
    176       },
    177     },
    178   ],
    179 }
    180