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:core', 11 'sfnt.gyp:sfnt', 12 'utils.gyp:utils', 13 ], 14 'include_dirs': [ 15 '../include/images', 16 '../include/effects', 17 '../include/ports', 18 '../include/xml', 19 '../src/core', 20 '../src/utils', 21 ], 22 'sources': [ 23 '../src/ports/SkDebug_nacl.cpp', 24 '../src/ports/SkDebug_stdio.cpp', 25 '../src/ports/SkDebug_win.cpp', 26 '../src/ports/SkFontHost_sandbox_none.cpp', 27 '../src/ports/SkFontHost_win.cpp', 28 '../src/ports/SkFontHost_win_dw.cpp', 29 '../src/ports/SkGlobalInitialization_default.cpp', 30 '../src/ports/SkThread_win.cpp', 31 32 '../src/ports/SkFontHost_tables.cpp', 33 '../src/ports/SkMemory_malloc.cpp', 34 '../src/ports/SkOSFile_stdio.cpp', 35 '../src/ports/SkTime_Unix.cpp', 36 '../src/ports/SkTime_win.cpp', 37 '../src/ports/SkXMLParser_empty.cpp', 38 ], 39 'conditions': [ 40 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', { 41 'defines': [ 42 #The font host requires at least FreeType 2.3.0 at runtime. 43 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020300',\ 44 'SK_CAN_USE_DLOPEN=1', 45 ], 46 'link_settings': { 47 'libraries': [ 48 '-lfreetype', 49 '-ldl', 50 ], 51 }, 52 'sources': [ 53 '../src/ports/SkFontHost_FreeType.cpp', 54 '../src/ports/SkFontHost_FreeType_common.cpp', 55 '../src/ports/SkFontHost_linux.cpp', 56 '../src/ports/SkThread_pthread.cpp', 57 ], 58 }], 59 [ 'skia_os == "nacl"', { 60 'dependencies': [ 61 # On other OS, we can dynamically link against freetype. For nacl, 62 # we have to include our own version since the naclports version is 63 # too old (<0x020300) to provide the functionality we need. 64 'freetype.gyp:freetype', 65 ], 66 'export_dependent_settings': [ 67 'freetype.gyp:freetype', 68 ], 69 'defines': [ 70 # We use Android's repo, which provides at least FreeType 2.4.0 71 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020400',\ 72 ], 73 'sources': [ 74 '../src/ports/SkFontHost_FreeType.cpp', 75 '../src/ports/SkFontHost_FreeType_common.cpp', 76 '../src/ports/SkFontHost_linux.cpp', 77 '../src/ports/SkThread_pthread.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 '../third_party/freetype/include/**', 91 ], 92 'sources': [ 93 '../src/ports/SkFontHost_mac_coretext.cpp', 94 '../src/utils/mac/SkStream_mac.cpp', 95 # '../src/ports/SkFontHost_FreeType.cpp', 96 # '../src/ports/SkFontHost_FreeType_common.cpp', 97 # '../src/ports/SkFontHost_freetype_mac.cpp', 98 '../src/ports/SkThread_pthread.cpp', 99 ], 100 'sources!': [ 101 '../src/ports/SkFontHost_tables.cpp', 102 ], 103 }], 104 [ 'skia_os == "ios"', { 105 'include_dirs': [ 106 '../include/utils/ios', 107 '../include/utils/mac', 108 ], 109 'sources': [ 110 '../src/ports/SkFontHost_mac_coretext.cpp', 111 '../src/utils/mac/SkStream_mac.cpp', 112 '../src/ports/SkThread_pthread.cpp', 113 ], 114 'sources!': [ 115 '../src/ports/SkFontHost_tables.cpp', 116 ], 117 }], 118 [ 'skia_os == "win"', { 119 'include_dirs': [ 120 'config/win', 121 '../src/utils/win', 122 ], 123 'conditions': [ 124 [ 'skia_directwrite', { 125 'sources!': [ 126 '../src/ports/SkFontHost_win.cpp', 127 ], 128 }, { # else !skia_directwrite 129 'sources!': [ 130 '../src/ports/SkFontHost_win_dw.cpp', 131 ], 132 }], 133 ], 134 'sources!': [ # these are used everywhere but windows 135 '../src/ports/SkDebug_stdio.cpp', 136 '../src/ports/SkTime_Unix.cpp', 137 ], 138 }, { # else !win 139 'sources!': [ 140 '../src/ports/SkDebug_win.cpp', 141 '../src/ports/SkFontHost_win.cpp', 142 '../src/ports/SkFontHost_win_dw.cpp', 143 '../src/ports/SkThread_win.cpp', 144 '../src/ports/SkTime_win.cpp', 145 ], 146 }], 147 [ 'skia_os == "android"', { 148 'defines': [ 149 #Android provides at least FreeType 2.4.0 at runtime. 150 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020400', 151 #Skia should not use dlopen on Android. 152 'SK_CAN_USE_DLOPEN=0', 153 ], 154 'sources!': [ 155 '../src/ports/SkDebug_stdio.cpp', 156 ], 157 'sources': [ 158 '../src/ports/SkDebug_android.cpp', 159 '../src/ports/SkThread_pthread.cpp', 160 '../src/ports/SkFontHost_android.cpp', 161 '../src/ports/SkFontHost_FreeType.cpp', 162 '../src/ports/SkFontHost_FreeType_common.cpp', 163 '../src/ports/FontHostConfiguration_android.cpp', 164 ], 165 'dependencies': [ 166 'freetype.gyp:freetype', 167 'android_deps.gyp:expat', 168 ], 169 }], 170 ], 171 'direct_dependent_settings': { 172 'include_dirs': [ 173 '../include/ports', 174 ], 175 }, 176 }, 177 ], 178 } 179 180 # Local Variables: 181 # tab-width:2 182 # indent-tabs-mode:nil 183 # End: 184 # vim: set expandtab tabstop=2 shiftwidth=2: 185