Changes from v3:
Correctly require libweston-uninstalled for libweston-desktop-uninstalled
Rebased on top of today's master


Changes from v2:
Change the commit log to explain what these files are for

Changes from v1:
Don't put the version # in the -uninstalled.pc name
add libweston-desktop-uninstalled.pc.in

Bests,

--
Reynaldo H. Verdejo Pinochet
Open Source Group - Samsung Research America
>From 2a2c245f562a4c3a54190f014a3313b878bb3f7b Mon Sep 17 00:00:00 2001
From: "Reynaldo H. Verdejo Pinochet" <[email protected]>
Date: Thu, 25 Aug 2016 14:05:15 -0700
Subject: [PATCH] build: add -uninstalled.pc.in files for libweston and
 libweston-desktop

-uninstalled.pc files are a pkg-config facility for working with
uninstalled libraries.

With pkg-config, foo-uninstalled.pc overrides foo.pc. foo-uninstalled.pc
should never be installed, and will be generated with references to the
build directory.

If you set up your environment so pkg-config looks for .pc files in your
build directories, you can use this to build and link against libraries
you haven't installed with "make install".

This can save time and space over installing with a prefix.

Signed-off-by: Reynaldo H. Verdejo Pinochet <[email protected]>
Acked-by: Bryce Harrington <[email protected]>
---
 configure.ac                                          | 2 ++
 libweston-desktop/libweston-desktop-uninstalled.pc.in | 9 +++++++++
 libweston/libweston-uninstalled.pc.in                 | 9 +++++++++
 3 files changed, 20 insertions(+)
 create mode 100644 libweston-desktop/libweston-desktop-uninstalled.pc.in
 create mode 100644 libweston/libweston-uninstalled.pc.in

diff --git a/configure.ac b/configure.ac
index c287fac6..5f31bbcb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -679,7 +679,9 @@ AC_CONFIG_FILES([Makefile libweston/version.h compositor/weston.pc])
 # AC_CONFIG_FILES needs the full name when running autoconf, so we need to use
 # libweston_abi_version here, and outside [] because of m4 quoting rules
 AC_CONFIG_FILES([libweston/libweston-]libweston_major_version[.pc:libweston/libweston.pc.in])
+AC_CONFIG_FILES([libweston/libweston-]libweston_major_version[-uninstalled.pc:libweston/libweston-uninstalled.pc.in])
 AC_CONFIG_FILES([libweston-desktop/libweston-desktop-]libweston_major_version[.pc:libweston-desktop/libweston-desktop.pc.in])
+AC_CONFIG_FILES([libweston-desktop/libweston-desktop-]libweston_major_version[-uninstalled.pc:libweston-desktop/libweston-desktop-uninstalled.pc.in])
 
 AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])
 
diff --git a/libweston-desktop/libweston-desktop-uninstalled.pc.in b/libweston-desktop/libweston-desktop-uninstalled.pc.in
new file mode 100644
index 00000000..4d621bd8
--- /dev/null
+++ b/libweston-desktop/libweston-desktop-uninstalled.pc.in
@@ -0,0 +1,9 @@
+libdir=@abs_builddir@/.libs
+includedir=@abs_srcdir@
+
+Name: libweston-desktop, uninstalled
+Description: Desktop shells abstraction library for libweston compositors (not installed)
+Version: @WESTON_VERSION@
+Requires.private: libweston-@LIBWESTON_MAJOR@-uninstalled wayland-server
+Cflags: -I${includedir}
+Libs: -L${libdir} -lweston-desktop-@LIBWESTON_MAJOR@
diff --git a/libweston/libweston-uninstalled.pc.in b/libweston/libweston-uninstalled.pc.in
new file mode 100644
index 00000000..67b4cba1
--- /dev/null
+++ b/libweston/libweston-uninstalled.pc.in
@@ -0,0 +1,9 @@
+libdir=@abs_builddir@/.libs
+includedir=@abs_srcdir@
+
+Name: libweston API, uninstalled
+Description: Header files for libweston compositors development (not installed)
+Version: @WESTON_VERSION@
+Requires.private: wayland-server pixman-1 xkbcommon
+Cflags: -I${includedir}
+Libs: -L${libdir} -lweston-@LIBWESTON_MAJOR@
-- 
2.14.1

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to