Skip to content
This repository has been archived by the owner on Nov 7, 2018. It is now read-only.

Commit

Permalink
Bug 1294490 - Part 5. Add --with-system-webp switch to build. r=glandium
Browse files Browse the repository at this point in the history
  • Loading branch information
aosmond committed Oct 31, 2018
1 parent 1bce82b commit 1d0e912
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/external/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ if CONFIG['MOZ_AV1']:
if not CONFIG['MOZ_SYSTEM_PNG']:
external_dirs += ['media/libpng']

if not CONFIG['MOZ_SYSTEM_WEBP']:
external_dirs += ['media/libwebp']

if CONFIG['CPU_ARCH'] == 'arm':
external_dirs += ['media/openmax_dl/dl']

Expand All @@ -57,7 +60,6 @@ external_dirs += [
'media/libtheora',
'media/libspeex_resampler',
'media/libsoundtouch',
'media/libwebp',
'media/mp4parse-rust',
'media/psshparser'
]
Expand Down
8 changes: 8 additions & 0 deletions config/system-headers.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,14 @@ if CONFIG['MOZ_SYSTEM_PNG']:
'png.h',
]

if CONFIG['MOZ_SYSTEM_WEBP']:
system_headers += [
'webp/decode.h',
'webp/demux.h',
'webp/mux_types.h',
'webp/types.h',
]

if CONFIG['MOZ_SYSTEM_ZLIB']:
system_headers += [
'zlib.h',
Expand Down
3 changes: 3 additions & 0 deletions toolkit/library/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ if CONFIG['MOZ_SYSTEM_JPEG']:
if CONFIG['MOZ_SYSTEM_PNG']:
OS_LIBS += CONFIG['MOZ_PNG_LIBS']

if CONFIG['MOZ_SYSTEM_WEBP']:
OS_LIBS += CONFIG['MOZ_WEBP_LIBS']

if CONFIG['MOZ_SYSTEM_LIBEVENT']:
OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']

Expand Down
8 changes: 8 additions & 0 deletions toolkit/moz.configure
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,14 @@ def skia_includes(skia):

set_config('SKIA_INCLUDES', skia_includes)

option('--with-system-webp',
help='Use system libwebp (located with pkgconfig)')

system_webp = pkg_check_modules('MOZ_WEBP', 'libwebp >= 1.0.0 libwebpdemux >= 1.0.0',
when='--with-system-webp')

set_config('MOZ_SYSTEM_WEBP', depends(when=system_webp)(lambda: True))

# Build Freetype in the tree
# ==============================================================
@depends(target, skia_pdf)
Expand Down

0 comments on commit 1d0e912

Please sign in to comment.