[cheese] Export libcheese-gtk as a shared library



commit 8cba2499a1cf5b194ae1377d6f8dca7d13622eb1
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 12 13:38:44 2010 +0000

    Export libcheese-gtk as a shared library
    
    https://bugzilla.gnome.org/show_bug.cgi?id=606734

 .gitignore                   |    1 +
 Makefile.am                  |    5 +++++
 cheese-gtk.pc.in             |   13 +++++++++++++
 configure.ac                 |   14 ++++++++++++++
 libcheese/Makefile.am        |    9 ++++++++-
 libcheese/cheese-gtk.symbols |    6 ++++++
 6 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b0b21bd..2344a82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,6 +41,7 @@ help/*/cheese.xml
 .waf-*
 _build_
 *.swp
+cheese-gtk.pc
 tests/cheese-test-widget
 tests/cheese-test-monitor
 tests/cheese-test-chooser
diff --git a/Makefile.am b/Makefile.am
index 3b9c7cd..c241154 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,9 +5,14 @@ EXTRA_DIST =			\
 	gnome-doc-utils.make\
 	ChangeLog.pre-git
 
+CLEANFILES = cheese-gtk.pc.in
+
 DISTCLEANFILES =		\
 	gnome-doc-utils.make
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = cheese-gtk.pc
+
 DISTCHECK_CONFIGURE_FLAGS = --disable-schemas-install --disable-scrollkeeper
 
 CHANGELOG_START = 2.26.0
diff --git a/cheese-gtk.pc.in b/cheese-gtk.pc.in
new file mode 100644
index 0000000..a2a4966
--- /dev/null
+++ b/cheese-gtk.pc.in
@@ -0,0 +1,13 @@
+prefix= prefix@
+exec_prefix= exec_prefix@
+libdir= libdir@
+includedir= includedir@
+
+
+Name: cheese
+Description: Cheese Webcam widgets
+Version: @VERSION@
+Requires.private: gtk+-x11-2.0 gstreamer-0.10 libcanberra-gtk
+Libs: -L${libdir} -lcheese-gtk
+Cflags: -I${includedir}/cheese
+
diff --git a/configure.ac b/configure.ac
index 24deaf4..f6712ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,6 +22,19 @@ GNOME_MAINTAINER_MODE_DEFINES
 GNOME_COMPILE_WARNINGS
 
 #*******************************************************************************
+# soname
+#*******************************************************************************
+# Before making a release, the CHEESE_LT_VERSION string should be modified.
+# The string is of the form C:R:A.
+# - If interfaces have been changed or added, but binary compatibility has
+#   been preserved, change to C+1:0:A+1
+# - If binary compatibility has been broken (eg removed or changed interfaces)
+#   change to C+1:0:0
+# - If the interface is the same as the previous version, change to C:R+1:A
+CHEESE_LT_VERSION=17:0:0
+AC_SUBST(CHEESE_LT_VERSION)
+
+#*******************************************************************************
 # Expanded dirs
 #*******************************************************************************
 # This macro expands DIR and assigns it to RET.
@@ -120,6 +133,7 @@ AM_GCONF_SOURCE_2
 
 AC_OUTPUT([
 Makefile
+cheese-gtk.pc
 data/Makefile
 data/cheese.desktop.in
 data/effects/Makefile
diff --git a/libcheese/Makefile.am b/libcheese/Makefile.am
index 0b61c14..9837304 100644
--- a/libcheese/Makefile.am
+++ b/libcheese/Makefile.am
@@ -40,8 +40,15 @@ libcheese_gtk_la_SOURCES = \
 	$(NULL)
 
 # FIXME when we have a .pc file, and sonames
-# include_HEADERS = cheese-widget.h
+cheesedir = $(includedir)/cheese
+cheese_HEADERS = cheese-widget.h cheese-avatar-chooser.h
 
 libcheese_gtk_la_LIBADD = \
 	libcheesecommon.la \
 	$(CHEESE_LIBS)
+libcheese_gtk_la_LDFLAGS = \
+	-version-info $(CHEESE_LT_VERSION)		\
+	-export-symbols $(srcdir)/cheese-gtk.symbols	\
+	-no-undefined					\
+	$(AM_LDFLAGS)
+
diff --git a/libcheese/cheese-gtk.symbols b/libcheese/cheese-gtk.symbols
new file mode 100644
index 0000000..5a24aa3
--- /dev/null
+++ b/libcheese/cheese-gtk.symbols
@@ -0,0 +1,6 @@
+cheese_widget_get_type
+cheese_widget_new
+cheese_widget_get_camera
+cheese_avatar_chooser_get_type
+cheese_avatar_chooser_new
+cheese_avatar_chooser_get_picture



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]