mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 08:46:47 +08:00
Add a gyp define LIBYUV_DISABLE_JPEG to not build jpeg library
BUG=346 TESTED=set GYP_DEFINES=target_arch=ia32 libyuv_disable_jpeg=1 & python gyp_libyuv -fninja -G msvs_version=2010 libyuv_test.gyp R=harryjin@google.com Review URL: https://webrtc-codereview.appspot.com/16989004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@1038 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
9f12361e39
commit
455c66b437
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 1037
|
||||
Version: 1038
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 1037
|
||||
#define LIBYUV_VERSION 1038
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
],
|
||||
'variables': {
|
||||
'use_system_libjpeg%': 0,
|
||||
'libyuv_disable_jpeg%': 0,
|
||||
'build_neon': 0,
|
||||
'conditions': [
|
||||
[ '(target_arch == "armv7" or target_arch == "armv7s" or (target_arch == "arm" and arm_version >= 7)) and target_subarch != 64 and (arm_neon == 1 or arm_neon_optional == 1)', {
|
||||
@ -71,8 +72,7 @@
|
||||
'LIBYUV_DISABLE_NEON'
|
||||
],
|
||||
}],
|
||||
# TODO(fbarchard): Use gyp define to enable jpeg.
|
||||
[ 'OS != "ios"', {
|
||||
[ 'OS != "ios" and libyuv_disable_jpeg != 1', {
|
||||
'defines': [
|
||||
'HAVE_JPEG'
|
||||
],
|
||||
|
||||
@ -7,6 +7,9 @@
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'libyuv_disable_jpeg%': 0,
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'libyuv_unittest',
|
||||
@ -62,7 +65,7 @@
|
||||
'DEBUG_INFORMATION_FORMAT' : 'dwarf-with-dsym',
|
||||
},
|
||||
}],
|
||||
[ 'OS != "ios"', {
|
||||
[ 'OS != "ios" and libyuv_disable_jpeg != 1', {
|
||||
'defines': [
|
||||
'HAVE_JPEG',
|
||||
],
|
||||
@ -116,22 +119,24 @@
|
||||
'util/psnr.cc',
|
||||
'util/ssim.cc',
|
||||
],
|
||||
'dependencies': [
|
||||
'libyuv.gyp:libyuv',
|
||||
],
|
||||
'conditions': [
|
||||
[ 'OS == "ios" and target_subarch == 64', {
|
||||
'defines': [
|
||||
'LIBYUV_DISABLE_NEON'
|
||||
],
|
||||
}],
|
||||
[ 'OS != "ios"', {
|
||||
|
||||
[ 'OS != "ios" and libyuv_disable_jpeg != 1', {
|
||||
'defines': [
|
||||
'HAVE_JPEG',
|
||||
],
|
||||
}],
|
||||
], # conditions
|
||||
'dependencies': [
|
||||
'libyuv.gyp:libyuv',
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
'target_name': 'cpuid',
|
||||
'type': 'executable',
|
||||
|
||||
@ -1253,4 +1253,12 @@ TEST_F(libyuvTest, CropNV12) {
|
||||
free_aligned_buffer_64(src_y);
|
||||
}
|
||||
|
||||
TEST_F(libyuvTest, HaveJPEG) {
|
||||
#ifdef HAVE_JPEG
|
||||
printf("JPEG enabled\n.");
|
||||
#else
|
||||
printf("JPEG disabled\n.");
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace libyuv
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user