Statistics
| Branch: | Tag: | Revision:

root / host / examples / CMakeLists.txt @ 14244880

History | View | Annotate | Download (2.06 KB)

1
#
2
# Copyright 2010-2011 Ettus Research LLC
3
#
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
########################################################################
19
# example applications
20
########################################################################
21
SET(example_sources
22
    benchmark_rate.cpp
23
    network_relay.cpp
24
    rx_multi_samples.cpp
25
    rx_samples_to_file.cpp
26
    rx_samples_to_udp.cpp
27
    rx_timed_samples.cpp
28
    test_messages.cpp
29
    test_pps_input.cpp
30
    tx_bursts.cpp
31
    tx_samples_from_file.cpp
32
    tx_timed_samples.cpp
33
    tx_waveforms.cpp
34
    latency_test.cpp
35
)
36

    
37
#for each source: build an executable and install
38
FOREACH(example_source ${example_sources})
39
    GET_FILENAME_COMPONENT(example_name ${example_source} NAME_WE)
40
    ADD_EXECUTABLE(${example_name} ${example_source})
41
    TARGET_LINK_LIBRARIES(${example_name} uhd)
42
    INSTALL(TARGETS ${example_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
43
ENDFOREACH(example_source)
44

    
45
########################################################################
46
# ASCII Art DFT - requires curses, so this part is optional
47
########################################################################
48
FIND_PACKAGE(Curses)
49

    
50
IF(CURSES_FOUND)
51
    INCLUDE_DIRECTORIES(${CURSES_INCLUDE_DIR})
52
    ADD_EXECUTABLE(rx_ascii_art_dft rx_ascii_art_dft.cpp)
53
    TARGET_LINK_LIBRARIES(rx_ascii_art_dft uhd ${CURSES_LIBRARIES})
54
    INSTALL(TARGETS rx_ascii_art_dft RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
55
ENDIF(CURSES_FOUND)