mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-19 20:08:28 +01:00
add shell for libwebpextras
meant to contain additional utility functions useful in processing webp input/output. Change-Id: I014ae6b917d62e826aa23a3bbe99aac4462a97c2
This commit is contained in:
parent
44bd95612e
commit
5c176d2d9b
15
configure.ac
15
configure.ac
@ -28,6 +28,7 @@ AC_ARG_ENABLE([everything],
|
||||
disabled with --disable-target]),
|
||||
[SET_IF_UNSET([enable_libwebpdecoder], [$enableval])
|
||||
SET_IF_UNSET([enable_libwebpdemux], [$enableval])
|
||||
SET_IF_UNSET([enable_libwebpextras], [$enableval])
|
||||
SET_IF_UNSET([enable_libwebpmux], [$enableval])])
|
||||
|
||||
AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=DIR],
|
||||
@ -527,6 +528,14 @@ AC_ARG_ENABLE([libwebpdecoder],
|
||||
AC_MSG_RESULT(${enable_libwebpdecoder-no})
|
||||
AM_CONDITIONAL([BUILD_LIBWEBPDECODER], [test "$enable_libwebpdecoder" = "yes"])
|
||||
|
||||
dnl === Check whether libwebpextras should be built
|
||||
AC_MSG_CHECKING(whether libwebpextras is to be built)
|
||||
AC_ARG_ENABLE([libwebpextras],
|
||||
AS_HELP_STRING([--enable-libwebpextras],
|
||||
[Build libwebpextras @<:@default=no@:>@]))
|
||||
AC_MSG_RESULT(${enable_libwebpextras-no})
|
||||
AM_CONDITIONAL([WANT_EXTRAS], [test "$enable_libwebpextras" = "yes"])
|
||||
|
||||
dnl =========================
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
@ -535,9 +544,10 @@ AC_CONFIG_FILES([Makefile src/Makefile man/Makefile \
|
||||
examples/Makefile src/dec/Makefile \
|
||||
src/enc/Makefile src/dsp/Makefile \
|
||||
src/demux/Makefile src/mux/Makefile \
|
||||
src/utils/Makefile \
|
||||
src/utils/Makefile src/extras/Makefile \
|
||||
src/libwebp.pc src/libwebpdecoder.pc \
|
||||
src/demux/libwebpdemux.pc src/mux/libwebpmux.pc])
|
||||
src/demux/libwebpdemux.pc src/mux/libwebpmux.pc \
|
||||
src/extras/libwebpextras.pc])
|
||||
|
||||
|
||||
AC_OUTPUT
|
||||
@ -553,6 +563,7 @@ libwebp: yes
|
||||
libwebpdecoder: ${enable_libwebpdecoder-no}
|
||||
libwebpdemux: ${enable_libwebpdemux-no}
|
||||
libwebpmux: ${enable_libwebpmux-no}
|
||||
libwebpextras: ${enable_libwebpextras-no}
|
||||
|
||||
Tools:
|
||||
cwebp : yes
|
||||
|
@ -1,5 +1,5 @@
|
||||
# The mux and demux libraries depend on libwebp, thus the '.' to force the
|
||||
# build order so it's available to them.
|
||||
# The mux, demux and extras libraries depend on libwebp, thus the '.' to force
|
||||
# the build order so it's available to them.
|
||||
SUBDIRS = dec enc dsp utils .
|
||||
if WANT_MUX
|
||||
SUBDIRS += mux
|
||||
@ -7,6 +7,9 @@ endif
|
||||
if WANT_DEMUX
|
||||
SUBDIRS += demux
|
||||
endif
|
||||
if WANT_EXTRAS
|
||||
SUBDIRS += extras
|
||||
endif
|
||||
|
||||
lib_LTLIBRARIES = libwebp.la
|
||||
|
||||
|
13
src/extras/Makefile.am
Normal file
13
src/extras/Makefile.am
Normal file
@ -0,0 +1,13 @@
|
||||
lib_LTLIBRARIES = libwebpextras.la
|
||||
|
||||
libwebpextras_la_SOURCES =
|
||||
libwebpextras_la_SOURCES += extras.c
|
||||
|
||||
libwebpextrasinclude_HEADERS =
|
||||
libwebpextrasinclude_HEADERS += ../webp/extras.h
|
||||
libwebpextrasinclude_HEADERS += ../webp/types.h
|
||||
|
||||
libwebpextras_la_LIBADD = ../libwebp.la
|
||||
libwebpextras_la_LDFLAGS = -no-undefined -version-info 0:0:0
|
||||
libwebpextrasincludedir = $(includedir)/webp
|
||||
pkgconfig_DATA = libwebpextras.pc
|
23
src/extras/extras.c
Normal file
23
src/extras/extras.c
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2015 Google Inc. All Rights Reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style license
|
||||
// that can be found in the COPYING file in the root of the source
|
||||
// tree. An additional intellectual property rights grant can be found
|
||||
// in the file PATENTS. All contributing project authors may
|
||||
// be found in the AUTHORS file in the root of the source tree.
|
||||
// -----------------------------------------------------------------------------
|
||||
//
|
||||
// Additional WebP utilities.
|
||||
//
|
||||
|
||||
#include "../webp/extras.h"
|
||||
|
||||
#define XTRA_MAJ_VERSION 0
|
||||
#define XTRA_MIN_VERSION 0
|
||||
#define XTRA_REV_VERSION 0
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
int WebPGetExtrasVersion(void) {
|
||||
return (XTRA_MAJ_VERSION << 16) | (XTRA_MIN_VERSION << 8) | XTRA_REV_VERSION;
|
||||
}
|
11
src/extras/libwebpextras.pc.in
Normal file
11
src/extras/libwebpextras.pc.in
Normal file
@ -0,0 +1,11 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: libwebpextras
|
||||
Description: Additional utility functions useful in processing WebP files
|
||||
Version: @PACKAGE_VERSION@
|
||||
Requires: libwebp >= 0.5.0
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lwebpextras
|
34
src/webp/extras.h
Normal file
34
src/webp/extras.h
Normal file
@ -0,0 +1,34 @@
|
||||
// Copyright 2015 Google Inc. All Rights Reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style license
|
||||
// that can be found in the COPYING file in the root of the source
|
||||
// tree. An additional intellectual property rights grant can be found
|
||||
// in the file PATENTS. All contributing project authors may
|
||||
// be found in the AUTHORS file in the root of the source tree.
|
||||
// -----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef WEBP_WEBP_EXTRAS_H_
|
||||
#define WEBP_WEBP_EXTRAS_H_
|
||||
|
||||
#include "./types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define WEBP_EXTRAS_ABI_VERSION 0x0000 // MAJOR(8b) + MINOR(8b)
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Returns the version number of the extras library, packed in hexadecimal using
|
||||
// 8bits for each of major/minor/revision. E.g: v2.5.7 is 0x020507.
|
||||
WEBP_EXTERN(int) WebPGetExtrasVersion(void);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* WEBP_WEBP_EXTRAS_H_ */
|
Loading…
Reference in New Issue
Block a user