2015-03-25 17:22:41 +00:00
|
|
|
# Copyright 2015 Google Inc.
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
2015-03-30 14:52:52 +00:00
|
|
|
|
2013-05-20 22:15:32 +00:00
|
|
|
# GYP file for images project.
|
2013-04-17 21:07:55 +00:00
|
|
|
{
|
2011-05-31 13:50:51 +00:00
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'images',
|
2012-10-10 19:45:51 +00:00
|
|
|
'product_name': 'skia_images',
|
2011-05-31 13:50:51 +00:00
|
|
|
'type': 'static_library',
|
2012-10-10 19:45:51 +00:00
|
|
|
'standalone_static_library': 1,
|
2011-06-23 21:43:52 +00:00
|
|
|
'dependencies': [
|
2013-07-22 14:39:45 +00:00
|
|
|
'core.gyp:*',
|
2015-03-30 14:52:52 +00:00
|
|
|
'giflib.gyp:giflib',
|
2015-11-06 19:15:49 +00:00
|
|
|
'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',
|
2014-05-22 18:40:29 +00:00
|
|
|
'etc1.gyp:libetc1',
|
2014-06-03 20:04:35 +00:00
|
|
|
'ktx.gyp:libSkKTX',
|
2013-03-14 14:42:18 +00:00
|
|
|
'libwebp.gyp:libwebp',
|
2011-06-23 21:43:52 +00:00
|
|
|
'utils.gyp:utils',
|
|
|
|
],
|
2011-05-31 13:50:51 +00:00
|
|
|
'include_dirs': [
|
|
|
|
'../include/images',
|
2015-07-28 15:55:14 +00:00
|
|
|
'../include/private',
|
2013-11-21 15:32:08 +00:00
|
|
|
'../src/lazy',
|
2013-04-25 17:33:51 +00:00
|
|
|
# for access to SkErrorInternals.h
|
|
|
|
'../src/core/',
|
2013-02-22 21:38:35 +00:00
|
|
|
# for access to SkImagePriv.h
|
|
|
|
'../src/image/',
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
'sources': [
|
2014-05-27 14:59:47 +00:00
|
|
|
'../include/images/SkDecodingImageGenerator.h',
|
2013-05-31 14:00:10 +00:00
|
|
|
'../include/images/SkForceLinking.h',
|
2015-06-15 16:10:03 +00:00
|
|
|
'../src/images/SkJpegUtility.h',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../include/images/SkMovie.h',
|
|
|
|
'../include/images/SkPageFlipper.h',
|
|
|
|
|
|
|
|
'../src/images/bmpdecoderhelper.cpp',
|
|
|
|
'../src/images/bmpdecoderhelper.h',
|
2013-03-14 14:42:18 +00:00
|
|
|
|
2013-11-21 15:32:08 +00:00
|
|
|
'../src/images/SkDecodingImageGenerator.cpp',
|
2013-05-31 14:00:10 +00:00
|
|
|
'../src/images/SkForceLinking.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageDecoder.cpp',
|
2013-04-17 21:07:55 +00:00
|
|
|
'../src/images/SkImageDecoder_FactoryDefault.cpp',
|
|
|
|
'../src/images/SkImageDecoder_FactoryRegistrar.cpp',
|
2014-02-05 16:35:12 +00:00
|
|
|
|
2013-05-01 21:17:27 +00:00
|
|
|
# If decoders are added/removed to/from (all/individual)
|
2013-05-31 14:00:10 +00:00
|
|
|
# platform(s), be sure to update SkForceLinking.cpp
|
2013-05-01 21:17:27 +00:00
|
|
|
# so the right decoders will be forced to link.
|
2014-02-05 16:35:12 +00:00
|
|
|
|
|
|
|
# IMPORTANT: The build order of the SkImageDecoder_*.cpp files
|
|
|
|
# defines the order image decoders are tested when decoding a
|
|
|
|
# stream. The last decoder is the first one tested, so the .cpp
|
|
|
|
# files should be in listed in order from the least likely to be
|
|
|
|
# used, to the most likely (jpeg and png should be the last two
|
|
|
|
# for instance.) As a result, they are deliberately not in
|
|
|
|
# alphabetical order.
|
|
|
|
'../src/images/SkImageDecoder_wbmp.cpp',
|
2014-05-22 18:40:29 +00:00
|
|
|
'../src/images/SkImageDecoder_pkm.cpp',
|
2014-06-03 20:04:35 +00:00
|
|
|
'../src/images/SkImageDecoder_ktx.cpp',
|
2014-08-07 19:58:38 +00:00
|
|
|
'../src/images/SkImageDecoder_astc.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageDecoder_libbmp.cpp',
|
|
|
|
'../src/images/SkImageDecoder_libgif.cpp',
|
|
|
|
'../src/images/SkImageDecoder_libico.cpp',
|
2014-02-05 16:35:12 +00:00
|
|
|
'../src/images/SkImageDecoder_libwebp.cpp',
|
2013-03-14 14:42:18 +00:00
|
|
|
'../src/images/SkImageDecoder_libjpeg.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageDecoder_libpng.cpp',
|
2014-02-05 16:35:12 +00:00
|
|
|
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageEncoder.cpp',
|
|
|
|
'../src/images/SkImageEncoder_Factory.cpp',
|
2013-04-23 18:06:23 +00:00
|
|
|
'../src/images/SkImageEncoder_argb.cpp',
|
2015-06-15 16:10:03 +00:00
|
|
|
'../src/images/SkJpegUtility.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkMovie.cpp',
|
|
|
|
'../src/images/SkMovie_gif.cpp',
|
|
|
|
'../src/images/SkPageFlipper.cpp',
|
|
|
|
'../src/images/SkScaledBitmapSampler.cpp',
|
|
|
|
'../src/images/SkScaledBitmapSampler.h',
|
2011-06-22 20:42:34 +00:00
|
|
|
|
2015-01-08 02:04:45 +00:00
|
|
|
'../src/ports/SkImageGenerator_skia.cpp',
|
|
|
|
|
2011-06-22 20:42:34 +00:00
|
|
|
'../src/ports/SkImageDecoder_CG.cpp',
|
|
|
|
'../src/ports/SkImageDecoder_WIC.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
'conditions': [
|
2011-07-01 20:20:07 +00:00
|
|
|
[ 'skia_os == "win"', {
|
2011-05-31 13:50:51 +00:00
|
|
|
'sources!': [
|
2013-04-17 21:07:55 +00:00
|
|
|
'../src/images/SkImageDecoder_FactoryDefault.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageDecoder_libgif.cpp',
|
|
|
|
'../src/images/SkImageDecoder_libpng.cpp',
|
|
|
|
'../src/images/SkMovie_gif.cpp',
|
|
|
|
],
|
2015-03-30 14:52:52 +00:00
|
|
|
'dependencies!': [
|
|
|
|
'giflib.gyp:giflib'
|
|
|
|
],
|
2011-11-21 21:04:06 +00:00
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
Libraries without '-l' treated as relative paths.
The following have the same effect on Windows:
'msvs_settings': { 'VCLinkerTool': { 'AdditionalDependencies': [ 'windowscodecs.lib', ],},},
'link_settings': {'libraries': ['-lwindowscodecs.lib',],},
But this one is different:
'link_settings': {'libraries': ['windowscodecs.lib',],},
since this last one will attempt to find the library at
third_party\skia\gyp\windowscodecs.lib
or a place like this, instead of looking in the library paths.
This also fixes capitalization of the affected libraries.
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/99463002
git-svn-id: http://skia.googlecode.com/svn/trunk@12434 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 19:54:33 +00:00
|
|
|
'-lwindowscodecs.lib',
|
2011-11-21 21:04:06 +00:00
|
|
|
],
|
|
|
|
},
|
2011-07-01 20:20:07 +00:00
|
|
|
},{ #else if skia_os != win
|
2011-06-22 20:42:34 +00:00
|
|
|
'sources!': [
|
|
|
|
'../src/ports/SkImageDecoder_WIC.cpp',
|
|
|
|
],
|
2011-05-31 13:50:51 +00:00
|
|
|
}],
|
2012-09-18 15:41:18 +00:00
|
|
|
[ 'skia_os in ["mac", "ios"]', {
|
2011-05-31 13:50:51 +00:00
|
|
|
'sources!': [
|
2013-04-17 21:07:55 +00:00
|
|
|
'../src/images/SkImageDecoder_FactoryDefault.cpp',
|
2011-06-15 17:33:29 +00:00
|
|
|
'../src/images/SkImageDecoder_libpng.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
'../src/images/SkImageDecoder_libgif.cpp',
|
|
|
|
'../src/images/SkMovie_gif.cpp',
|
|
|
|
],
|
2011-07-01 20:20:07 +00:00
|
|
|
},{ #else if skia_os != mac
|
2011-06-22 20:42:34 +00:00
|
|
|
'sources!': [
|
|
|
|
'../src/ports/SkImageDecoder_CG.cpp',
|
|
|
|
],
|
2011-05-31 13:50:51 +00:00
|
|
|
}],
|
2013-04-11 22:24:35 +00:00
|
|
|
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
|
Build Skia for a bare-bones embedded Linux system.
Motivation:
I have downloaded a barebones Linux system built for 64-bit ARM
from linaro.org and a ARMv8 Foundation Model from arm.com to run
it on. This will let us build and test Skia on ARM64 before we
aquire hardware to allow that. This CL introduces the changes to
the build files necessary to build Skia on a barebones embedded
Linux system. I tested it with the aarch64 GCC compiler provided
by linaro.org.
Changes:
Add a "barelinux" target_os for the DEPS file. Add an optional
git download of zlib.
Changes to gyp files: these changes abstract out libpng, libz, and
giflib so that images.gyp doesn't know whether they are static or
dynamically linked. I also add the variables skia_giflib_static,
skia_libpng_static, skia_zlib_static, and skia_freetype_static,
all of which default to false but when set to true will override
the behavior of the giflib, libpng, zlib, and freetype build
targets to require them to build statically. Also, the
skia_no_fontconfig variable turns off use of the fontconfig service.
Scripts in platform_tools/barelinux/bin:
arm64_download - this script downloads the Linaro's ARMv8 Aarch64
toolchain and minimal embedded Linux system as well as ARM's
foundation model. The required files are mirrored on Google
Cloud. The script then starts a emulated Arm64 Linux system in
the background. After the boot is complete, you can SSH into the
system at port 8022 via user@localhost. The SSH key will be
downloaded into the working directery as well.
download_deps - Uses gclient to download Skia's dependencies for a
bare Linux system (the normal dependecies plus giflib, libpng, and
zlib.)
barelinux_make - this script builds a version of skia that does
not depend on external libraries, perfect for putting in an
embedded system running Linux. Assumes you have run download_deps
first.
To test:
To build a barelinux target, use the barelinux_make script.
To build for a armv8 system: skia_arch_type=arm arm_neon=0 armv7=1
armv8=1 arm_thumb=0 skia_arch_width=64 and set the CC and CXX
variables to point at the cross-compiler downloaded by
arm64_download.
R=djsollen@google.com, scroggo@google.com, borenet@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/152513007
git-svn-id: http://skia.googlecode.com/svn/trunk@13570 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-24 20:22:34 +00:00
|
|
|
'dependencies': [
|
|
|
|
'libpng.gyp:libpng',
|
|
|
|
],
|
2015-03-30 14:52:52 +00:00
|
|
|
# end libpng stuff
|
2011-05-31 13:50:51 +00:00
|
|
|
}],
|
2011-11-03 13:08:29 +00:00
|
|
|
[ 'skia_os == "android"', {
|
2013-02-01 15:57:13 +00:00
|
|
|
'include_dirs': [
|
|
|
|
'../src/utils',
|
2011-11-03 13:08:29 +00:00
|
|
|
],
|
2015-11-06 19:15:49 +00:00
|
|
|
'dependencies': [
|
|
|
|
'libpng.gyp:libpng',
|
|
|
|
],
|
2014-02-05 16:35:12 +00:00
|
|
|
'conditions': [
|
2015-11-06 19:15:49 +00:00
|
|
|
[ 'skia_android_framework == 1', {
|
2014-08-28 12:41:21 +00:00
|
|
|
# The android framework disables these decoders as they are of little use to
|
|
|
|
# Java applications that can't take advantage of the compressed formats.
|
|
|
|
'sources!': [
|
|
|
|
'../src/images/SkImageDecoder_pkm.cpp',
|
|
|
|
'../src/images/SkImageDecoder_ktx.cpp',
|
|
|
|
'../src/images/SkImageDecoder_astc.cpp',
|
2014-02-05 16:35:12 +00:00
|
|
|
],
|
|
|
|
}],
|
2013-07-23 15:51:12 +00:00
|
|
|
],
|
2011-11-03 13:08:29 +00:00
|
|
|
}],
|
2013-06-11 15:52:19 +00:00
|
|
|
[ 'skia_os == "chromeos"', {
|
|
|
|
'dependencies': [
|
2015-03-30 14:52:52 +00:00
|
|
|
'libpng.gyp:libpng',
|
2013-06-11 15:52:19 +00:00
|
|
|
],
|
|
|
|
}],
|
2012-09-18 15:41:18 +00:00
|
|
|
[ 'skia_os == "ios"', {
|
|
|
|
'include_dirs': [
|
|
|
|
'../include/utils/mac',
|
|
|
|
],
|
|
|
|
}],
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
'direct_dependent_settings': {
|
|
|
|
'include_dirs': [
|
|
|
|
'../include/images',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|