ref: 46d30cd33c984610ecc1826e8014ec8a41e4cf3e
parent: 2dbb757d3009acdbf7acbaf0d211e7e6efb212f3
author: Zaheer Abbas Merali <[email protected]>
date: Sun Oct 26 11:25:15 EDT 2014
Add pkg-config file.
--- a/.gitignore
+++ b/.gitignore
@@ -44,3 +44,6 @@
testbin/test_vd_rc.yuv
testbin/test.264
testbin/test.yuv
+
+# pkg-config file
+*.pc
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,7 @@
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 @@
$(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 @@
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
--- /dev/null
+++ b/openh264.pc.in
@@ -1,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}