scroggo | 3e56227 | 2015-03-25 10:22:41 -0700 | [diff] [blame] | 1 | # Copyright 2015 Google Inc. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
commit-bot@chromium.org | 2982a4f | 2014-01-21 19:48:47 +0000 | [diff] [blame] | 5 | # Target for building freetype. |
reed@google.com | b76b34e | 2011-11-10 15:00:52 +0000 | [diff] [blame] | 6 | { |
reed@google.com | b76b34e | 2011-11-10 15:00:52 +0000 | [diff] [blame] | 7 | 'targets': [ |
| 8 | { |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 9 | 'target_name': 'freetype', |
djsollen@google.com | 2679ff8 | 2013-07-22 14:12:56 +0000 | [diff] [blame] | 10 | 'type': 'none', |
| 11 | 'conditions': [ |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 12 | [ 'skia_freetype_static', |
| 13 | { |
| 14 | 'dependencies': [ |
| 15 | 'freetype_static' |
djsollen@google.com | 2679ff8 | 2013-07-22 14:12:56 +0000 | [diff] [blame] | 16 | ], |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 17 | 'export_dependent_settings': [ |
| 18 | 'freetype_static' |
| 19 | ], |
| 20 | 'conditions': [ |
borenet | 4808757 | 2015-04-02 12:16:36 -0700 | [diff] [blame] | 21 | [ 'skia_os == "android"', |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 22 | { |
| 23 | 'direct_dependent_settings': { |
| 24 | 'defines': [ |
borenet | 4808757 | 2015-04-02 12:16:36 -0700 | [diff] [blame] | 25 | # Android provides at least FreeType 2.4.0 |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 26 | 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020400', |
| 27 | 'SK_CAN_USE_DLOPEN=0', |
| 28 | ], |
| 29 | } |
| 30 | } |
| 31 | ] |
| 32 | ], |
| 33 | }, { # (not skia_freetype_static) |
| 34 | # dynamic linking depends on the OS: |
| 35 | 'conditions': [ |
borenet | 43bf511 | 2016-04-29 14:01:34 -0700 | [diff] [blame] | 36 | [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 37 | { |
| 38 | 'direct_dependent_settings': { |
| 39 | 'include_dirs' : [ |
| 40 | '/usr/include/freetype2', |
| 41 | ], |
| 42 | 'link_settings': { |
| 43 | 'libraries': [ |
| 44 | '-lfreetype', |
| 45 | ], |
| 46 | }, |
| 47 | 'defines': [ |
bungeman | 5ec443c | 2014-11-21 13:18:34 -0800 | [diff] [blame] | 48 | # Skia's FreeType port requires at least FreeType 2.3.8 |
| 49 | # for building and at runtime. |
| 50 | 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020308', |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 51 | 'SK_CAN_USE_DLOPEN=1', |
| 52 | ], |
| 53 | } |
| 54 | }, |
djsollen@google.com | 2679ff8 | 2013-07-22 14:12:56 +0000 | [diff] [blame] | 55 | ], |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 56 | [ 'skia_android_framework', |
| 57 | { |
| 58 | 'direct_dependent_settings': { |
| 59 | 'defines': [ |
| 60 | # Android provides at least FreeType 2.4.0 |
| 61 | 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020400', |
| 62 | 'SK_CAN_USE_DLOPEN=0', |
| 63 | ], |
| 64 | }, |
| 65 | 'include_dirs': [ |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 66 | 'external/freetype/include', |
| 67 | ], |
| 68 | 'libraries': [ |
| 69 | '-lft2', |
| 70 | ], |
| 71 | } |
djsollen@google.com | 2679ff8 | 2013-07-22 14:12:56 +0000 | [diff] [blame] | 72 | ], |
djsollen@google.com | 2679ff8 | 2013-07-22 14:12:56 +0000 | [diff] [blame] | 73 | ], |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 74 | } |
| 75 | ], |
djsollen@google.com | 2679ff8 | 2013-07-22 14:12:56 +0000 | [diff] [blame] | 76 | ], |
| 77 | }, |
| 78 | { |
| 79 | 'target_name': 'freetype_static', |
reed@google.com | b76b34e | 2011-11-10 15:00:52 +0000 | [diff] [blame] | 80 | 'type': 'static_library', |
borenet@google.com | 5661c5b | 2013-02-27 14:12:55 +0000 | [diff] [blame] | 81 | 'standalone_static_library': 1, |
djsollen@google.com | 2e767c3 | 2013-07-23 12:22:11 +0000 | [diff] [blame] | 82 | 'dependencies': [ |
| 83 | # we are dependent upon PNG for color emoji glyphs |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 84 | 'libpng.gyp:libpng', |
djsollen@google.com | 2e767c3 | 2013-07-23 12:22:11 +0000 | [diff] [blame] | 85 | ], |
commit-bot@chromium.org | 327c081 | 2013-08-20 18:57:01 +0000 | [diff] [blame] | 86 | 'includes': [ |
mtklein | 2271256 | 2015-03-11 11:55:13 -0700 | [diff] [blame] | 87 | # TODO: merge this back in here? |
commit-bot@chromium.org | 327c081 | 2013-08-20 18:57:01 +0000 | [diff] [blame] | 88 | 'freetype.gypi', |
vandebo@chromium.org | 54c538e | 2013-08-20 17:06:22 +0000 | [diff] [blame] | 89 | ], |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 90 | 'conditions': [ |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 91 | [ 'skia_os == "android"', { |
| 92 | # These flags are used by the Android OS. They are probably overkill |
| 93 | # for Skia, but we add them for consistency. |
| 94 | 'cflags': [ |
| 95 | '-W', |
| 96 | '-Wall', |
| 97 | '-fPIC', |
| 98 | '-DPIC', |
| 99 | '-DDARWIN_NO_CARBON', |
| 100 | '-DFT2_BUILD_LIBRARY', |
| 101 | '-O2', |
| 102 | ], |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 103 | }], |
djsollen | f9deeb6 | 2016-03-07 12:30:47 -0800 | [diff] [blame] | 104 | [ 'skia_clang_build == 1', { |
| 105 | 'cflags':[ |
djsollen | 460f405 | 2016-04-25 11:45:35 -0700 | [diff] [blame] | 106 | '-w', |
djsollen | f9deeb6 | 2016-03-07 12:30:47 -0800 | [diff] [blame] | 107 | ], |
| 108 | }], |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 109 | ], |
reed@google.com | b76b34e | 2011-11-10 15:00:52 +0000 | [diff] [blame] | 110 | }, |
reed@google.com | b76b34e | 2011-11-10 15:00:52 +0000 | [diff] [blame] | 111 | ], |
| 112 | } |