Add pkg-config file.

This commit is contained in:
Zaheer Abbas Merali 2014-10-26 15:25:15 -07:00
parent 2dbb757d30
commit 46d30cd33c
3 changed files with 18 additions and 1 deletions

3
.gitignore vendored
View File

@ -44,3 +44,6 @@ testbin/test_vd_rc.264
testbin/test_vd_rc.yuv
testbin/test.264
testbin/test.yuv
# pkg-config file
*.pc

View File

@ -26,6 +26,7 @@ PROJECT_NAME=openh264
MODULE_NAME=gmpopenh264
GMP_API_BRANCH=master
CCASFLAGS=$(CFLAGS)
VERSION=1.1
ifeq (,$(wildcard $(SRC_PATH)gmp-api))
HAVE_GMP_API=No
@ -206,6 +207,9 @@ $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX): $(MODULE_OBJS) $(ENCODER_OBJS) $(
$(QUIET)rm -f $@
$(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(SHLDFLAGS) $(MODULE_LDFLAGS)
$(PROJECT_NAME).pc: $(PROJECT_NAME).pc.in
@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' < $(PROJECT_NAME).pc.in > $(PROJECT_NAME).pc
install-headers:
mkdir -p $(PREFIX)/include/wels
install -m 644 codec/api/svc/codec*.h $(PREFIX)/include/wels
@ -214,9 +218,10 @@ install-static: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) install-headers
mkdir -p $(PREFIX)/lib
install -m 644 $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(PREFIX)/lib
install-shared: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) install-headers
install-shared: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) install-headers $(PROJECT_NAME).pc
mkdir -p $(PREFIX)/lib
install -m 755 $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) $(PREFIX)/lib
install -m 444 $(PROJECT_NAME).pc $(PREFIX)/lib/pkgconfig
ifneq ($(EXTRA_LIBRARY),)
install -m 644 $(EXTRA_LIBRARY) $(PREFIX)/lib
endif

9
openh264.pc.in Normal file
View File

@ -0,0 +1,9 @@
prefix=@prefix@
libdir=${prefix}/lib
includedir=${prefix}/include
Name: OpenH264
Description: OpenH264 is a codec library which supports H.264 encoding and decoding. It is suitable for use in real time applications such as WebRTC.
Version: @VERSION@
Libs: -L${libdir} -lopenh264
Cflags: -I${includedir}