2015-03-25 14:16:13 +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-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-25 14:16:13 +00:00
|
|
|
|
2015-03-03 16:59:20 +00:00
|
|
|
# GYP file for codec project.
|
|
|
|
{
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'codec',
|
|
|
|
'product_name': 'skia_codec',
|
|
|
|
'type': 'static_library',
|
|
|
|
'standalone_static_library': 1,
|
|
|
|
'dependencies': [
|
|
|
|
'core.gyp:*',
|
2015-04-01 13:58:48 +00:00
|
|
|
'giflib.gyp:giflib',
|
2015-11-06 19:15:49 +00:00
|
|
|
'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',
|
|
|
|
'libpng.gyp:libpng',
|
2015-06-18 19:53:43 +00:00
|
|
|
'libwebp.gyp:libwebp',
|
2015-03-03 16:59:20 +00:00
|
|
|
],
|
2016-02-17 16:26:31 +00:00
|
|
|
'cflags':[
|
|
|
|
# FIXME: This gets around a warning: "Argument might be clobbered by longjmp".
|
|
|
|
'-Wno-clobbered -Wno-error',
|
2015-03-25 18:11:52 +00:00
|
|
|
],
|
2015-03-03 16:59:20 +00:00
|
|
|
'include_dirs': [
|
|
|
|
'../include/codec',
|
2015-07-28 15:55:14 +00:00
|
|
|
'../include/private',
|
2015-03-03 16:59:20 +00:00
|
|
|
'../src/codec',
|
2015-03-25 12:27:48 +00:00
|
|
|
'../src/core',
|
2016-01-12 14:51:11 +00:00
|
|
|
'../src/utils',
|
2015-03-03 16:59:20 +00:00
|
|
|
],
|
|
|
|
'sources': [
|
2015-10-21 17:27:10 +00:00
|
|
|
'../src/codec/SkAndroidCodec.cpp',
|
2015-07-30 18:36:40 +00:00
|
|
|
'../src/codec/SkBmpCodec.cpp',
|
2015-08-06 22:34:42 +00:00
|
|
|
'../src/codec/SkBmpMaskCodec.cpp',
|
|
|
|
'../src/codec/SkBmpRLECodec.cpp',
|
|
|
|
'../src/codec/SkBmpStandardCodec.cpp',
|
2015-03-03 16:59:20 +00:00
|
|
|
'../src/codec/SkCodec.cpp',
|
2016-01-07 21:17:19 +00:00
|
|
|
'../src/codec/SkGifCodec.cpp',
|
|
|
|
'../src/codec/SkIcoCodec.cpp',
|
2015-04-15 14:32:19 +00:00
|
|
|
'../src/codec/SkJpegCodec.cpp',
|
|
|
|
'../src/codec/SkJpegDecoderMgr.cpp',
|
2015-06-18 16:58:57 +00:00
|
|
|
'../src/codec/SkJpegUtility_codec.cpp',
|
2015-03-16 18:55:18 +00:00
|
|
|
'../src/codec/SkMaskSwizzler.cpp',
|
|
|
|
'../src/codec/SkMasks.cpp',
|
2016-01-21 17:05:23 +00:00
|
|
|
'../src/codec/SkPngCodec.cpp',
|
2015-10-09 18:07:34 +00:00
|
|
|
'../src/codec/SkSampler.cpp',
|
2015-10-28 21:06:10 +00:00
|
|
|
'../src/codec/SkSampledCodec.cpp',
|
2015-03-03 16:59:20 +00:00
|
|
|
'../src/codec/SkSwizzler.cpp',
|
2016-01-07 21:17:19 +00:00
|
|
|
'../src/codec/SkWbmpCodec.cpp',
|
2015-10-21 17:27:10 +00:00
|
|
|
'../src/codec/SkWebpAdapterCodec.cpp',
|
2015-06-18 19:53:43 +00:00
|
|
|
'../src/codec/SkWebpCodec.cpp',
|
2016-01-14 21:12:26 +00:00
|
|
|
|
|
|
|
'../src/codec/SkCodecImageGenerator.cpp',
|
2016-02-17 18:02:29 +00:00
|
|
|
'../src/ports/SkImageGenerator_skia.cpp',
|
2015-03-03 16:59:20 +00:00
|
|
|
],
|
|
|
|
'direct_dependent_settings': {
|
|
|
|
'include_dirs': [
|
|
|
|
'../include/codec',
|
|
|
|
],
|
|
|
|
},
|
2015-11-06 19:15:49 +00:00
|
|
|
'defines': [
|
2016-02-17 16:26:31 +00:00
|
|
|
# Turn on all of the codecs, since we know that we have all of the
|
|
|
|
# necessary dependencies. Clients that are missing some of the
|
|
|
|
# required decoding libraries may choose to turn the codecs on or
|
|
|
|
# off individually.
|
|
|
|
'SK_CODEC_DECODES_GIF',
|
|
|
|
'SK_CODEC_DECODES_JPEG',
|
|
|
|
'SK_CODEC_DECODES_PNG',
|
|
|
|
'SK_CODEC_DECODES_WEBP',
|
|
|
|
|
|
|
|
# Turn on libjpeg-turbo optimizations since we know that the
|
|
|
|
# appropriate version of libjpeg-turbo is present.
|
2015-11-06 19:15:49 +00:00
|
|
|
'TURBO_HAS_SKIP',
|
2016-02-12 20:35:48 +00:00
|
|
|
'TURBO_HAS_565',
|
2015-11-06 19:15:49 +00:00
|
|
|
],
|
2016-01-25 16:26:16 +00:00
|
|
|
'conditions': [
|
2016-02-02 19:56:33 +00:00
|
|
|
['skia_codec_decodes_raw', {
|
2016-01-25 16:26:16 +00:00
|
|
|
'dependencies': [
|
|
|
|
'raw_codec',
|
|
|
|
],
|
|
|
|
},],
|
2016-02-22 20:27:46 +00:00
|
|
|
['skia_android_framework == 0', {
|
|
|
|
'defines': [
|
|
|
|
# TODO (msarett): Add this optimization to Android.
|
|
|
|
# https://buganizer.corp.google.com/u/0/issues/27290496
|
|
|
|
'TURBO_HAS_CROP',
|
|
|
|
],
|
|
|
|
},],
|
2016-01-25 16:26:16 +00:00
|
|
|
],
|
|
|
|
}, {
|
|
|
|
# RAW codec needs exceptions. Due to that, it is a separate target. Its usage can be
|
2016-02-02 19:56:33 +00:00
|
|
|
# controlled by skia_codec_decodes_raw flag.
|
2016-01-25 16:26:16 +00:00
|
|
|
'target_name': 'raw_codec',
|
|
|
|
'product_name': 'raw_codec',
|
|
|
|
'type': 'static_library',
|
|
|
|
'dependencies': [
|
|
|
|
'core.gyp:*',
|
|
|
|
'dng_sdk.gyp:dng_sdk-selector',
|
|
|
|
'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',
|
|
|
|
'piex.gyp:piex-selector',
|
|
|
|
],
|
|
|
|
'cflags':[
|
|
|
|
'-fexceptions',
|
|
|
|
],
|
2016-01-27 16:25:53 +00:00
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
|
|
|
# Need this because we are handling exception in SkRawCodec, which will trigger warning
|
|
|
|
# C4530. Add this flag as suggested by the compiler.
|
|
|
|
'AdditionalOptions': ['/EHsc', ],
|
|
|
|
},
|
|
|
|
},
|
2016-01-25 16:26:16 +00:00
|
|
|
'include_dirs': [
|
|
|
|
'../include/codec',
|
|
|
|
'../include/private',
|
|
|
|
'../src/codec',
|
|
|
|
'../src/core',
|
|
|
|
],
|
|
|
|
'sources': [
|
|
|
|
'../src/codec/SkRawAdapterCodec.cpp',
|
|
|
|
'../src/codec/SkRawCodec.cpp',
|
|
|
|
],
|
|
|
|
'direct_dependent_settings': {
|
|
|
|
'include_dirs': [
|
|
|
|
'../include/codec',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'conditions': [
|
|
|
|
['skia_arch_type == "x86" or skia_arch_type == "arm"', {
|
|
|
|
'defines': [
|
|
|
|
'qDNGBigEndian=0',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
['skia_os == "ios" or skia_os == "mac"', {
|
|
|
|
'xcode_settings': {
|
|
|
|
'OTHER_CFLAGS': ['-fexceptions'],
|
|
|
|
'OTHER_CPLUSPLUSFLAGS': ['-fexceptions'],
|
|
|
|
},
|
|
|
|
}],
|
|
|
|
],
|
2015-03-03 16:59:20 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|