aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples/CMakeLists.txt
diff options
context:
space:
mode:
authorPhilip Balister <philip@opensdr.com>2010-11-04 08:02:10 -0400
committerPhilip Balister <philip@opensdr.com>2010-11-04 08:02:10 -0400
commit40080e474268291c915f8d68e99506e8ae2a3f75 (patch)
tree99581ec02c77b08a11f38af901dc9db35adcbe3a /host/examples/CMakeLists.txt
parent7f8d7b0e2fef1b2d5bb9c8047380dcf958c0c49c (diff)
parent16351339eb6962288844cefefbdb3f6eece8aca1 (diff)
downloaduhd-40080e474268291c915f8d68e99506e8ae2a3f75.tar.gz
uhd-40080e474268291c915f8d68e99506e8ae2a3f75.tar.bz2
uhd-40080e474268291c915f8d68e99506e8ae2a3f75.zip
Merge remote branch 'origin/usrp_e_next' into usrp_e_next
Diffstat (limited to 'host/examples/CMakeLists.txt')
-rw-r--r--host/examples/CMakeLists.txt63
1 files changed, 30 insertions, 33 deletions
diff --git a/host/examples/CMakeLists.txt b/host/examples/CMakeLists.txt
index fb7777d42..ce2ca9640 100644
--- a/host/examples/CMakeLists.txt
+++ b/host/examples/CMakeLists.txt
@@ -16,38 +16,35 @@
#
########################################################################
-ADD_EXECUTABLE(benchmark_rx_rate benchmark_rx_rate.cpp)
-TARGET_LINK_LIBRARIES(benchmark_rx_rate uhd)
-
-ADD_EXECUTABLE(rx_timed_samples rx_timed_samples.cpp)
-TARGET_LINK_LIBRARIES(rx_timed_samples uhd)
-
-ADD_EXECUTABLE(rx_to_file rx_to_file.cpp)
-TARGET_LINK_LIBRARIES(rx_to_file uhd)
-
-ADD_EXECUTABLE(test_async_messages test_async_messages.cpp)
-TARGET_LINK_LIBRARIES(test_async_messages uhd)
-
-ADD_EXECUTABLE(test_pps_input test_pps_input.cpp)
-TARGET_LINK_LIBRARIES(test_pps_input uhd)
-
-ADD_EXECUTABLE(tx_timed_samples tx_timed_samples.cpp)
-TARGET_LINK_LIBRARIES(tx_timed_samples uhd)
-
-ADD_EXECUTABLE(tx_from_file tx_from_file.cpp)
-TARGET_LINK_LIBRARIES(tx_from_file uhd)
+# example applications
+########################################################################
+SET(example_sources
+ benchmark_rx_rate.cpp
+ rx_samples_to_file.cpp
+ rx_samples_to_udp.cpp
+ rx_timed_samples.cpp
+ test_async_messages.cpp
+ test_pps_input.cpp
+ tx_timed_samples.cpp
+ tx_waveforms.cpp
+)
-ADD_EXECUTABLE(tx_waveforms tx_waveforms.cpp)
-TARGET_LINK_LIBRARIES(tx_waveforms uhd)
+#for each source: build an executable and install
+FOREACH(example_source ${example_sources})
+ GET_FILENAME_COMPONENT(example_name ${example_source} NAME_WE)
+ ADD_EXECUTABLE(${example_name} ${example_source})
+ TARGET_LINK_LIBRARIES(${example_name} uhd)
+ INSTALL(TARGETS ${example_name} RUNTIME DESTINATION ${PKG_DATA_DIR}/examples)
+ENDFOREACH(example_source)
-INSTALL(TARGETS
- benchmark_rx_rate
- rx_timed_samples
- test_async_messages
- test_pps_input
- tx_timed_samples
- tx_from_file
- rx_to_file
- tx_waveforms
- RUNTIME DESTINATION ${PKG_DATA_DIR}/examples
-)
+########################################################################
+# ASCII Art DFT - requires curses, so this part is optional
+########################################################################
+INCLUDE(FindCurses)
+
+IF(CURSES_FOUND)
+ INCLUDE_DIRECTORIES(${CURSES_INCLUDE_DIR})
+ ADD_EXECUTABLE(rx_ascii_art_dft rx_ascii_art_dft.cpp)
+ TARGET_LINK_LIBRARIES(rx_ascii_art_dft uhd ${CURSES_LIBRARIES})
+ INSTALL(TARGETS rx_ascii_art_dft RUNTIME DESTINATION ${PKG_DATA_DIR}/examples)
+ENDIF(CURSES_FOUND)