0001-cmake.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 931b198dae23863dd2e5c205bd819991a7259d85 Mon Sep 17 00:00:00 2001
  2. From: orbea <orbea@riseup.net>
  3. Date: Wed, 11 Nov 2020 10:05:41 -0800
  4. Subject: [PATCH] cmake: Fix compatiblity with older cmake versions.
  5. IMPORTED_TARGET was only introduced in cmake 3.6 and FAudio
  6. does not build with GStremer versions older than 1.9.2.
  7. Fixes https://github.com/FNA-XNA/FAudio/issues/226
  8. v2: Use _LDFLAGS to ensure linking against the correct gstreamer.
  9. ---
  10. CMakeLists.txt | 12 ++++++------
  11. 1 file changed, 6 insertions(+), 6 deletions(-)
  12. diff --git a/CMakeLists.txt b/CMakeLists.txt
  13. index bb57a672..58da7f18 100644
  14. --- a/CMakeLists.txt
  15. +++ b/CMakeLists.txt
  16. @@ -142,9 +142,9 @@ if(GSTREAMER)
  17. # Find GStreamer
  18. find_package(PkgConfig)
  19. - pkg_check_modules(GST REQUIRED IMPORTED_TARGET gstreamer-1.0)
  20. - pkg_check_modules(GSTAUDIO REQUIRED IMPORTED_TARGET gstreamer-audio-1.0)
  21. - pkg_check_modules(GSTAPP REQUIRED IMPORTED_TARGET gstreamer-app-1.0)
  22. + pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.9.2)
  23. + pkg_check_modules(GSTAUDIO REQUIRED gstreamer-audio-1.0>=1.9.2)
  24. + pkg_check_modules(GSTAPP REQUIRED gstreamer-app-1.0>=1.9.2)
  25. # Include/Link GStreamer...
  26. target_include_directories(FAudio PRIVATE
  27. @@ -153,9 +153,9 @@ if(GSTREAMER)
  28. ${GSTAPP_INCLUDE_DIRS}
  29. )
  30. target_link_libraries(FAudio PRIVATE
  31. - PkgConfig::GST
  32. - PkgConfig::GSTAUDIO
  33. - PkgConfig::GSTAPP
  34. + ${GST_LDFLAGS}
  35. + ${GSTAUDIO_LDFLAGS}
  36. + ${GSTAPP_LDFLAGS}
  37. )
  38. endif(GSTREAMER)