summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 19:05:22 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 19:05:22 +0000
commit57eae4d1f44474aa35442f55bdcfded20f7ac841 (patch)
tree79435d77212b08ea9ae3cb7ea4f65c25dc91db94 /third_party
parentd8b41f66e8037830d42b333ab6e5cd0e4ce0dc81 (diff)
downloadchromium_src-57eae4d1f44474aa35442f55bdcfded20f7ac841.zip
chromium_src-57eae4d1f44474aa35442f55bdcfded20f7ac841.tar.gz
chromium_src-57eae4d1f44474aa35442f55bdcfded20f7ac841.tar.bz2
Add use_system_vpx flag.
This allows Chromium to build against libvpx as provided by the system. Patch based on one from fta. http://codereview.chromium.org/2075023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47943 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/ffmpeg/ffmpeg.gyp28
1 files changed, 24 insertions, 4 deletions
diff --git a/third_party/ffmpeg/ffmpeg.gyp b/third_party/ffmpeg/ffmpeg.gyp
index 0a6aa8a..fd13847 100644
--- a/third_party/ffmpeg/ffmpeg.gyp
+++ b/third_party/ffmpeg/ffmpeg.gyp
@@ -15,6 +15,10 @@
# When set to zero will build Chromium against the patched ffmpegsumo
# headers, but not build ffmpegsumo itself. Users are expected to build
# and provide their own version of ffmpegsumo. Default value is 1.
+# use_system_vpx
+# When set to non-zero, will build Chromium against the system libvpx.
+# libvpx doesn't currently supply a pkg-config file, so we assume that
+# -lvpx is sufficient.
{
'target_defaults': {
@@ -38,6 +42,7 @@
'variables': {
# Allow overridding the selection of which FFmpeg binaries to copy via an
# environment variable. Affects the ffmpeg_binaries target.
+
'conditions': [
['chromeos==1', {
'ffmpeg_branding%': '<(branding)OS',
@@ -60,10 +65,10 @@
# libvpx location.
# TODO(scherkus): libvpx_hack_dir is a hack to make -L work on linux.
['OS=="mac" or OS=="win"', {
- 'libvpx_dir': '../libvpx',
+ 'libvpx_incl_dir': '../libvpx/include',
'libvpx_hack_dir': '../libvpx',
}, {
- 'libvpx_dir': '../libvpx',
+ 'libvpx_incl_dir': '../libvpx/include',
'libvpx_hack_dir': 'third_party/libvpx',
}],
],
@@ -72,6 +77,7 @@
'use_system_ffmpeg%': 0,
'use_system_yasm%': 0,
'build_ffmpegsumo%': 1,
+ 'use_system_vpx%': 0,
# Locations for generated artifacts.
'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/ffmpeg',
@@ -152,7 +158,6 @@
'source/config/<(ffmpeg_branding)/<(OS)/<(ffmpeg_config)',
'source/patched-ffmpeg-mt',
'source/config',
- '<(libvpx_dir)/include',
],
'defines': [
'HAVE_AV_CONFIG_H',
@@ -386,7 +391,6 @@
'ldflags': [
'-Wl,-Bsymbolic',
'-L<(shared_generated_dir)',
- '-L<(libvpx_hack_dir)/lib/<(OS)/<(target_arch)',
],
'libraries': [
'-lz',
@@ -406,6 +410,11 @@
'-l<(asm_library)',
],
}],
+ ['use_system_vpx==0', {
+ 'ldflags': [
+ '-L<(libvpx_hack_dir)/lib/<(OS)/<(target_arch)',
+ ],
+ }],
],
},
}], # OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"
@@ -448,6 +457,17 @@
],
},
}], # OS=="mac"
+ ['use_system_vpx==0', {
+ 'include_dirs': [
+ '<(libvpx_incl_dir)',
+ ],
+ }, {
+ # Using libvpx provided by the system.
+ 'include_dirs': [
+ '/usr/include/vpx',
+ ],
+ }
+ ],
],
'actions': [
{