skia2/gyp/freetype.gyp

122 lines
3.7 KiB
Plaintext
Raw Normal View History

# Target for building freetype.
{
'targets': [
{
'target_name': 'freetype',
'type': 'none',
'conditions': [
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
'direct_dependent_settings': {
'include_dirs' : [
'/usr/include/freetype2',
],
'link_settings': {
'libraries': [
'-lfreetype',
],
'defines': [
#The font host requires at least FreeType 2.3.0 at runtime.
'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020300',\
'SK_CAN_USE_DLOPEN=1',
],
}
},
}],
[ 'skia_os in ["android", "nacl"]', {
'dependencies': [
'freetype_static'
],
'export_dependent_settings': [
'freetype_static'
],
'direct_dependent_settings': {
'defines': [
# Both Android and NaCl provide at least FreeType 2.4.0
'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020400',
'SK_CAN_USE_DLOPEN=0',
],
},
}],
Gyp file changes for the android framework. Split off from https://codereview.chromium.org/140503007/. The eventual goal is to create our Android.mk from gyp. This patch adds an option for skia_android_framework with the right settings. The follow-up (https://codereview.chromium.org/140503007/) will use scripts to create the final makefile. gyp/android_deps.gyp: Use different dependencies for the framework than for building Skia normally. gyp/android_framework_lib.gyp: Like skia_lib, specifies the minimum needed for building Skia, in this case for the framework. gyp/common_conditions.gypi: Add settings specific to skia_android_framework. In some cases this means turning off flags and defines. gyp/common.gypi Turn off SK_DEBUG and SK_DEVELOPER when building for the framework. This allows the framework to create a single makefile which can be modified to add SK_DEBUG and SK_DEVELOPER as desired. gyp/common_variables.gypi: Add skia_android_framework. gyp/core.gyp: Don't depend on cpufeatures, and add the cutils library for skia_android_framework. gyp/freetype.gyp: skia_android_framework-specific options: Don't include freetype_static as a dependency. Include the proper folders. Include the android library. gyp/images.gyp: Don't export libjpeg as a dependency for targets that include images for the framework. Also reorder image decoders to match the Android order, leaving our most commonly used ones last (and therefore first in the chain for trying them). gyp/libwebp.gyp: Use the system webp when building for the Android framework. Specify the correct settings for the framework. gyp/opts.gyp: Specify a default set of files to compile when there are no possible optimizations. gyp/pdf.gyp: Add dependencies for Android framework. gyp/zlib.gyp: Include the zlib folder, and undefine SK_ZLIB_INCLUDE. BUG=skia:1975 R=djsollen@google.com Review URL: https://codereview.chromium.org/153093003 git-svn-id: http://skia.googlecode.com/svn/trunk@13298 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-04 14:50:20 +00:00
[ 'skia_android_framework', {
'include_dirs': [
'external/expat/lib',
'external/freetype/include',
],
'libraries': [
'-lft2',
],
# Remove these, and use the system's freetype instead.
'dependencies!': [
'freetype_static',
],
'export_dependent_settings!': [
'freetype_static',
]
}],
],
},
{
'target_name': 'freetype_static',
'type': 'static_library',
'standalone_static_library': 1,
'dependencies': [
# we are dependent upon PNG for color emoji glyphs
'images.gyp:images'
],
'includes': [
# common freetype sources needed for both the base Skia build and the
# libpoppler build for testing only
'freetype.gypi',
],
'include_dirs': [
'../third_party/freetype/include_overrides',
],
'direct_dependent_settings': {
'include_dirs': [
'../third_party/freetype/include_overrides',
],
},
'conditions': [
[ 'skia_os == "android"', {
# These flags are used by the Android OS. They are probably overkill
# for Skia, but we add them for consistency.
'cflags': [
'-W',
'-Wall',
'-fPIC',
'-DPIC',
'-DDARWIN_NO_CARBON',
'-DFT2_BUILD_LIBRARY',
'-O2',
],
}],
],
},
{
'target_name': 'freetype_poppler',
'type': 'static_library',
'standalone_static_library': 1,
'includes': [
'freetype.gypi',
],
'sources': [
# additional components used by poppler
'../third_party/externals/freetype/src/base/ftbdf.c',
'../third_party/externals/freetype/src/base/ftpfr.c',
'../third_party/externals/freetype/src/bdf/bdf.c',
'../third_party/externals/freetype/src/cid/type1cid.c',
'../third_party/externals/freetype/src/pcf/pcf.c',
'../third_party/externals/freetype/src/pfr/pfr.c',
'../third_party/externals/freetype/src/psaux/psaux.c',
'../third_party/externals/freetype/src/type1/type1.c',
'../third_party/externals/freetype/src/type42/type42.c',
'../third_party/externals/freetype/src/winfonts/winfnt.c',
'../third_party/externals/freetype/src/gzip/ftgzip.c',
'../third_party/externals/freetype/src/lzw/ftlzw.c',
],
},
],
}