gnuradio-3.6.1-automagic-audio.patch 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. diff -ur a/gr-audio/lib/CMakeLists.txt b/gr-audio/lib/CMakeLists.txt
  2. --- a/gr-audio/lib/CMakeLists.txt 2012-06-11 17:55:20.000000000 +0200
  3. +++ b/gr-audio/lib/CMakeLists.txt 2012-06-12 23:34:58.601611171 +0200
  4. @@ -38,7 +38,11 @@
  5. ########################################################################
  6. find_package(ALSA)
  7. -if(ALSA_FOUND)
  8. +GR_REGISTER_COMPONENT("gr-audio-alsa" ENABLE_GR_AUDIO_ALSA
  9. + ALSA_FOUND
  10. +)
  11. +
  12. +if(ALSA_FOUND AND ENABLE_GR_AUDIO_ALSA)
  13. include_directories(${CMAKE_CURRENT_SOURCE_DIR}/alsa ${ALSA_INCLUDE_DIRS})
  14. list(APPEND gr_audio_libs ${ALSA_LIBRARIES})
  15. @@ -49,14 +53,18 @@
  16. )
  17. list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/alsa/gr-audio-alsa.conf)
  18. -endif(ALSA_FOUND)
  19. +endif(ALSA_FOUND AND ENABLE_GR_AUDIO_ALSA)
  20. ########################################################################
  21. ## OSS Support
  22. ########################################################################
  23. find_package(OSS)
  24. -if(OSS_FOUND)
  25. +GR_REGISTER_COMPONENT("gr-audio-oss" ENABLE_GR_AUDIO_OSS
  26. + OSS_FOUND
  27. +)
  28. +
  29. +if(OSS_FOUND AND ENABLE_GR_AUDIO_OSS)
  30. include_directories(${CMAKE_CURRENT_SOURCE_DIR}/oss ${OSS_INCLUDE_DIRS})
  31. list(APPEND gr_audio_sources
  32. @@ -65,7 +73,7 @@
  33. )
  34. list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/oss/gr-audio-oss.conf)
  35. -endif(OSS_FOUND)
  36. +endif(OSS_FOUND AND ENABLE_GR_AUDIO_OSS)
  37. ########################################################################
  38. @@ -73,7 +81,11 @@
  39. ########################################################################
  40. find_package(Jack)
  41. -if(JACK_FOUND)
  42. +GR_REGISTER_COMPONENT("gr-audio-jack" ENABLE_GR_AUDIO_JACK
  43. + JACK_FOUND
  44. +)
  45. +
  46. +if(JACK_FOUND AND ENABLE_GR_AUDIO_JACK)
  47. include_directories(${CMAKE_CURRENT_SOURCE_DIR}/jack ${JACK_INCLUDE_DIRS})
  48. list(APPEND gr_audio_libs ${JACK_LIBRARIES})
  49. @@ -85,7 +97,7 @@
  50. )
  51. list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/jack/gr-audio-jack.conf)
  52. -endif(JACK_FOUND)
  53. +endif(JACK_FOUND AND ENABLE_GR_AUDIO_JACK)
  54. ########################################################################
  55. ## OSX Support
  56. @@ -115,7 +127,11 @@
  57. ########################################################################
  58. find_package(Portaudio)
  59. -if(PORTAUDIO_FOUND)
  60. +GR_REGISTER_COMPONENT("gr-audio-portaudio" ENABLE_GR_AUDIO_PORTAUDIO
  61. + PORTAUDIO_FOUND
  62. +)
  63. +
  64. +if(PORTAUDIO_FOUND AND ENABLE_GR_AUDIO_PORTAUDIO)
  65. include_directories(${CMAKE_CURRENT_SOURCE_DIR}/portaudio ${PORTAUDIO_INCLUDE_DIRS})
  66. list(APPEND gr_audio_libs ${PORTAUDIO_LIBRARIES})
  67. @@ -127,7 +143,7 @@
  68. )
  69. list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/gr-audio-portaudio.conf)
  70. -endif(PORTAUDIO_FOUND)
  71. +endif(PORTAUDIO_FOUND AND ENABLE_GR_AUDIO_PORTAUDIO)
  72. ########################################################################
  73. ## Windows Support