Statistics
| Branch: | Tag: | Revision:

root / host / examples / CMakeLists.txt @ 08e2432c

History | View | Annotate | Download (2.09 KB)

1 8d76c9a4 Josh Blum
#
2 a54c4ab9 Josh Blum
# Copyright 2010-2011 Ettus Research LLC
3 8d76c9a4 Josh Blum
#
4
# This program is free software: you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation, either version 3 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
#
17
18 b7e3450a Josh Blum
########################################################################
19 f820cce9 Josh Blum
# example applications
20
########################################################################
21
SET(example_sources
22 21db20f3 Josh Blum
    benchmark_rate.cpp
23 a6d3483b Josh Blum
    network_relay.cpp
24 f7687f06 Josh Blum
    rx_multi_samples.cpp
25 dc9f22c9 Josh Blum
    rx_samples_to_file.cpp
26
    rx_samples_to_udp.cpp
27 f820cce9 Josh Blum
    rx_timed_samples.cpp
28 34265334 Josh Blum
    test_messages.cpp
29 f820cce9 Josh Blum
    test_pps_input.cpp
30 08e2432c Josh Blum
    test_timed_commands.cpp
31 202ae928 Nick Foster
    tx_bursts.cpp
32 1ab38031 Josh Blum
    tx_samples_from_file.cpp
33 f820cce9 Josh Blum
    tx_timed_samples.cpp
34
    tx_waveforms.cpp
35 4b9f4b5a Matt Ettus
    latency_test.cpp
36 fadd3a44 Josh Blum
)
37 3c6ede3c Josh Blum
38 f820cce9 Josh Blum
#for each source: build an executable and install
39
FOREACH(example_source ${example_sources})
40
    GET_FILENAME_COMPONENT(example_name ${example_source} NAME_WE)
41
    ADD_EXECUTABLE(${example_name} ${example_source})
42
    TARGET_LINK_LIBRARIES(${example_name} uhd)
43 14244880 Josh Blum
    INSTALL(TARGETS ${example_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
44 f820cce9 Josh Blum
ENDFOREACH(example_source)
45
46 3c6ede3c Josh Blum
########################################################################
47
# ASCII Art DFT - requires curses, so this part is optional
48
########################################################################
49 3017907f Josh Blum
FIND_PACKAGE(Curses)
50 3c6ede3c Josh Blum
51
IF(CURSES_FOUND)
52
    INCLUDE_DIRECTORIES(${CURSES_INCLUDE_DIR})
53
    ADD_EXECUTABLE(rx_ascii_art_dft rx_ascii_art_dft.cpp)
54
    TARGET_LINK_LIBRARIES(rx_ascii_art_dft uhd ${CURSES_LIBRARIES})
55 14244880 Josh Blum
    INSTALL(TARGETS rx_ascii_art_dft RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
56 3c6ede3c Josh Blum
ENDIF(CURSES_FOUND)