Add the libusb dependency to the pkg-config file.
When linking dynamically, the shared library contains a reference to all external dependencies, and the linker can easily resolve them. However when linking statically, all external dependencies have to be specified explicitly. This rule also applies to dependencies that are not exposed through the public api. The pkg-config Requires.private field is used to support both static and dynamic linking correctly.
This commit is contained in:
parent
b7a6be15ca
commit
eda03255a8
@ -47,6 +47,7 @@ AM_CONDITIONAL([OS_WIN32], [test "$os_win32" = "yes"])
|
||||
PKG_CHECK_MODULES([LIBUSB], [libusb-1.0], [have_libusb=yes], [have_libusb=no])
|
||||
if test "$have_libusb" = "yes"; then
|
||||
AC_DEFINE([HAVE_LIBUSB], [1], [libusb support])
|
||||
AC_SUBST([DEPENDENCIES], [libusb-1.0])
|
||||
fi
|
||||
|
||||
# Checks for IrDA support.
|
||||
|
||||
@ -6,5 +6,6 @@ includedir=@includedir@
|
||||
Name: libdivecomputer
|
||||
Description: A library for communication with various dive computers.
|
||||
Version: @VERSION@
|
||||
Requires.private: @DEPENDENCIES@
|
||||
Libs: -L${libdir} -ldivecomputer
|
||||
Cflags: -I${includedir}/libdivecomputer
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user