Home | History | Annotate | Download | only in gyp
      1 {
      2   'targets': [
      3     {
      4       'target_name': 'freetype',
      5       'type': 'none',
      6       'conditions': [
      7         [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
      8           'direct_dependent_settings': {
      9             'include_dirs' : [
     10               '/usr/include/freetype2',
     11             ],
     12             'link_settings': {
     13               'libraries': [
     14                 '-lfreetype',
     15               ],
     16               'defines': [
     17                 #The font host requires at least FreeType 2.3.0 at runtime.
     18                 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020300',\
     19                 'SK_CAN_USE_DLOPEN=1',
     20               ],
     21             }
     22           },
     23         }],
     24         [ 'skia_os in ["android", "nacl"]', {
     25           'dependencies': [
     26             'freetype_static'
     27           ],
     28           'export_dependent_settings': [
     29             'freetype_static'
     30           ],
     31           'direct_dependent_settings': {
     32             'defines': [
     33               # Both Android and NaCl provide at least FreeType 2.4.0
     34               'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020400',
     35               'SK_CAN_USE_DLOPEN=0',
     36             ],
     37           },
     38         }],
     39       ],
     40     },
     41     {
     42       'target_name': 'freetype_static',
     43       'type': 'static_library',
     44       'standalone_static_library': 1,
     45       'dependencies': [
     46         # we are dependent upon PNG for color emoji glyphs
     47         'images.gyp:images'
     48       ],
     49       'sources': [
     50         # base components (required)
     51         '../third_party/externals/freetype/src/base/ftsystem.c',
     52         '../third_party/externals/freetype/src/base/ftinit.c',
     53         '../third_party/externals/freetype/src/base/ftdebug.c',
     54         '../third_party/externals/freetype/src/base/ftbase.c',
     55 
     56         '../third_party/externals/freetype/src/base/ftbbox.c',       # recommended, see <freetype/ftbbox.h>
     57         '../third_party/externals/freetype/src/base/ftglyph.c',      # recommended, see <freetype/ftglyph.h>
     58 
     59         '../third_party/externals/freetype/src/base/ftbitmap.c',     # optional, see <freetype/ftbitmap.h>
     60         '../third_party/externals/freetype/src/base/ftfstype.c',     # optional
     61         '../third_party/externals/freetype/src/base/ftgasp.c',       # optional, see <freetype/ftgasp.h>
     62         '../third_party/externals/freetype/src/base/ftlcdfil.c',     # optional, see <freetype/ftlcdfil.h>
     63         '../third_party/externals/freetype/src/base/ftmm.c',         # optional, see <freetype/ftmm.h>
     64         '../third_party/externals/freetype/src/base/ftpatent.c',     # optional
     65         '../third_party/externals/freetype/src/base/ftstroke.c',     # optional, see <freetype/ftstroke.h>
     66         '../third_party/externals/freetype/src/base/ftsynth.c',      # optional, see <freetype/ftsynth.h>
     67         '../third_party/externals/freetype/src/base/fttype1.c',      # optional, see <freetype/t1tables.h>
     68         '../third_party/externals/freetype/src/base/ftwinfnt.c',     # optional, see <freetype/ftwinfnt.h>
     69         '../third_party/externals/freetype/src/base/ftxf86.c',       # optional, see <freetype/ftxf86.h>
     70 
     71         # font drivers (optional; at least one is needed)
     72         '../third_party/externals/freetype/src/cff/cff.c',           # CFF/OpenType font driver
     73         '../third_party/externals/freetype/src/sfnt/sfnt.c',         # SFNT files support (TrueType & OpenType)
     74         '../third_party/externals/freetype/src/truetype/truetype.c', # TrueType font driver
     75 
     76         # rasterizers (optional; at least one is needed for vector formats)
     77         '../third_party/externals/freetype/src/raster/raster.c',     # monochrome rasterizer
     78         '../third_party/externals/freetype/src/smooth/smooth.c',     # anti-aliasing rasterizer
     79 
     80         # auxiliary modules (optional)
     81         '../third_party/externals/freetype/src/autofit/autofit.c',   # auto hinting module
     82         '../third_party/externals/freetype/src/pshinter/pshinter.c', # PS hinting module
     83         '../third_party/externals/freetype/src/psnames/psnames.c',   # PostScript glyph names support
     84       ],
     85       'include_dirs': [
     86         '../third_party/freetype/include_overrides',
     87         '../third_party/externals/freetype/internal',
     88         '../third_party/externals/freetype/builds',
     89         '../third_party/externals/freetype/include',
     90         '../third_party/externals/freetype',
     91       ],
     92       'cflags': [
     93         '-DFT2_BUILD_LIBRARY',
     94       ],
     95       'direct_dependent_settings': {
     96         'include_dirs': [
     97           '../third_party/freetype/include_overrides',
     98           '../third_party/externals/freetype/include',
     99         ],
    100       },
    101       'conditions': [
    102         [ 'skia_warnings_as_errors', {
    103           'cflags!': [
    104             '-Werror',
    105           ],
    106         }],
    107         [ 'skia_os == "mac"', {
    108           'sources': [
    109             '../third_party/externals/freetype/src/base/ftmac.c',        # only on the Macintosh
    110           ],
    111         }],
    112         [ 'skia_os == "android"', {
    113           # These flags are used by the Android OS.  They are probably overkill
    114           # for Skia, but we add them for consistency.
    115           'cflags': [
    116             '-W',
    117             '-Wall',
    118             '-fPIC',
    119             '-DPIC',
    120             '-DDARWIN_NO_CARBON',
    121             '-DFT2_BUILD_LIBRARY',
    122             '-O2',
    123           ],
    124         }],
    125       ],
    126     },
    127   ],
    128 }
    129 
    130 # Local Variables:
    131 # tab-width:2
    132 # indent-tabs-mode:nil
    133 # End:
    134 # vim: set expandtab tabstop=2 shiftwidth=2:
    135