summaryrefslogtreecommitdiffstats
path: root/binding/CMakeLists.txt
diff options
context:
space:
mode:
authorScott Murray <scottm@ghidorah.spiteful.org>2018-05-28 21:16:23 -0400
committerScott Murray <scott.murray@konsulko.com>2018-06-05 21:17:14 -0400
commit9f5ed322b54f12c1055d2a124d687965083d4dee (patch)
tree4d8d115bd3683d3e2ff01379d55e04ff9f9e6579 /binding/CMakeLists.txt
parent127da1228b47486de500424e4a2ab3f0f5f0ec4a (diff)
Rework output to directly support 4Aflounder_5.99.1flounder/5.99.15.99.1
When building for 4A, switch to new gstreamer-based ALSA output for the RTL-SDR backend, and the Kingfisher backend now uses a gstreamer pipeline for its loopback to either an ALSA or Pulse sink depending on 4A or not. Using gstreamer instead of direct ALSA output has the benefit of transparently handling resampling to the M3ULCB hardware's required 48 KHz sample rate for the RTL-SDR backend. Change-Id: I2bfbf924927bb461cce88b04aba0e626f8d71215 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'binding/CMakeLists.txt')
-rw-r--r--binding/CMakeLists.txt25
1 files changed, 19 insertions, 6 deletions
diff --git a/binding/CMakeLists.txt b/binding/CMakeLists.txt
index d279945..c295eb0 100644
--- a/binding/CMakeLists.txt
+++ b/binding/CMakeLists.txt
@@ -26,6 +26,11 @@ PROJECT_TARGET_ADD(radio-binding)
radio-binding.c
radio_impl_kingfisher.c
radio_impl_rtlsdr.c)
+ if(HAVE_4A_FRAMEWORK)
+ add_definitions(-DHAVE_4A_FRAMEWORK)
+ endif()
+
+ PKG_CHECK_MODULES(SOUND REQUIRED gstreamer-1.0)
add_library(${TARGET_NAME} MODULE ${radio_SOURCES})
@@ -38,7 +43,8 @@ PROJECT_TARGET_ADD(radio-binding)
)
# Library dependencies (include updates automatically)
- TARGET_LINK_LIBRARIES(${TARGET_NAME} ${link_libraries})
+ TARGET_COMPILE_OPTIONS(${TARGET_NAME} PUBLIC ${SOUND_CFLAGS})
+ TARGET_LINK_LIBRARIES(${TARGET_NAME} ${SOUND_LIBRARIES} ${link_libraries})
# installation directory
INSTALL(TARGETS ${TARGET_NAME}
@@ -51,9 +57,16 @@ PROJECT_TARGET_ADD(rtl_fm_helper)
set(helper_SOURCES
${TARGET_NAME}.c
rtl_fm.c
- convenience/convenience.c
- radio_output.c)
- PKG_CHECK_MODULES(SOUND REQUIRED libpulse-simple)
+ convenience/convenience.c)
+ if(HAVE_4A_FRAMEWORK)
+ set(helper_SOURCES ${helper_SOURCES} radio_output_gstreamer.c)
+ PKG_CHECK_MODULES(helper_SOUND REQUIRED gstreamer-1.0)
+ else()
+ set(helper_SOURCES ${helper_SOURCES} radio_output_pulse.c)
+ PKG_CHECK_MODULES(helper_SOUND REQUIRED libpulse-simple)
+ endif()
+
+ PKG_CHECK_MODULES(helper_RTLSDR REQUIRED librtlsdr)
add_executable(${TARGET_NAME} ${helper_SOURCES})
@@ -62,6 +75,6 @@ PROJECT_TARGET_ADD(rtl_fm_helper)
OUTPUT_NAME ${TARGET_NAME}
)
- PKG_CHECK_MODULES(RTLSDR REQUIRED librtlsdr)
+ TARGET_COMPILE_OPTIONS(${TARGET_NAME} PUBLIC ${helper_SOUND_CFLAGS})
TARGET_LINK_LIBRARIES(${TARGET_NAME}
- ${RTLSDR_LIBRARIES} ${SOUND_LIBRARIES} ${link_libraries} m)
+ ${helper_RTLSDR_LIBRARIES} ${helper_SOUND_LIBRARIES} ${link_libraries} m)