0001-Add-Libs.private-for-static-linking.patch 1.4 KB

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