xref: /OK3568_Linux_fs/buildroot/package/libsoxr/0001-Add-Libs.private-for-static-linking.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 7d2d1039f303b6322ecb72eebae39b699fd28d19 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
3Date: Fri, 22 Feb 2019 01:31:11 +0100
4Subject: [PATCH] Add Libs.private in soxr.pc.in for static linking
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9If libsoxr is build statically against libavutil other applications
10needs to know that they must link with `-lavutil` when building in a
11static context.
12
13Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
14---
15 CMakeLists.txt | 1 +
16 src/soxr.pc.in | 1 +
17 2 files changed, 2 insertions(+)
18
19diff --git a/CMakeLists.txt b/CMakeLists.txt
20index ee48f6c..714bd4d 100644
21--- a/CMakeLists.txt
22+++ b/CMakeLists.txt
23@@ -139,6 +139,7 @@ if (WITH_AVFFT OR (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND SIMD32_FOUND AND WI
24   if (AVUTIL_FOUND)
25     include_directories (${AVUTIL_INCLUDE_DIRS})
26     set (LIBS ${LIBS} ${AVUTIL_LIBRARIES})
27+    set (PKGCONF_LIBS_PRIV ${PKGCONF_LIBS_PRIV} -lavutil)
28   endif ()
29 endif ()
30
31diff --git a/src/soxr.pc.in b/src/soxr.pc.in
32index 69d225b..6c530a6 100644
33--- a/src/soxr.pc.in
34+++ b/src/soxr.pc.in
35@@ -2,4 +2,5 @@ Name: ${PROJECT_NAME}
36 Description: ${DESCRIPTION_SUMMARY}
37 Version: ${PROJECT_VERSION}
38 Libs: -L${LIB_INSTALL_DIR} -l${PROJECT_NAME}
39+Libs.private: ${PKGCONF_LIBS_PRIV}
40 Cflags: -I${INCLUDE_INSTALL_DIR}
41--
422.20.1
43
44