Merge "add shell for libwebpextras"

This commit is contained in:
James Zern
2015-03-11 18:53:50 -07:00
committed by Gerrit Code Review
6 changed files with 99 additions and 4 deletions

View File

@ -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
View 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
View 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;
}

View 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
View 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_ */