Statistics
| Branch: | Tag: | Revision:

root / host / utils / CMakeLists.txt @ 0df49b75

History | View | Annotate | Download (2.91 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
# Utilities that get installed into the runtime path
20
########################################################################
21
SET(util_runtime_sources
22
    uhd_find_devices.cpp
23
    uhd_usrp_probe.cpp
24
    uhd_cal_rx_iq_balance.cpp
25
    uhd_cal_tx_dc_offset.cpp
26
    uhd_cal_tx_iq_balance.cpp
27
)
28

    
29
#for each source: build an executable and install
30
FOREACH(util_source ${util_runtime_sources})
31
    GET_FILENAME_COMPONENT(util_name ${util_source} NAME_WE)
32
    ADD_EXECUTABLE(${util_name} ${util_source})
33
    TARGET_LINK_LIBRARIES(${util_name} uhd)
34
    INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities)
35
ENDFOREACH(util_source)
36

    
37
########################################################################
38
# Utilities that get installed into the share path
39
########################################################################
40
SET(util_share_sources
41
    usrp_burn_db_eeprom.cpp
42
    usrp_burn_mb_eeprom.cpp
43
)
44

    
45
IF(ENABLE_USB)
46
    LIST(APPEND util_share_sources
47
        fx2_init_eeprom.cpp
48
    )
49
ENDIF(ENABLE_USB)
50

    
51
IF(LINUX AND ENABLE_USB)
52
    INSTALL(FILES
53
        uhd-usrp.rules
54
        DESTINATION ${PKG_LIB_DIR}/utils
55
        COMPONENT utilities
56
    )
57
ENDIF(LINUX AND ENABLE_USB)
58

    
59
#for each source: build an executable and install
60
FOREACH(util_source ${util_share_sources})
61
    GET_FILENAME_COMPONENT(util_name ${util_source} NAME_WE)
62
    ADD_EXECUTABLE(${util_name} ${util_source})
63
    TARGET_LINK_LIBRARIES(${util_name} uhd)
64
    INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/utils COMPONENT utilities)
65
ENDFOREACH(util_source)
66

    
67
IF(ENABLE_USRP2)
68
    IF(WIN32 AND UHD_RELEASE_MODE) #include dd.exe
69
        FILE(DOWNLOAD
70
            "http://files.ettus.com/dd.exe"
71
            ${CMAKE_CURRENT_BINARY_DIR}/dd.exe
72
        )
73
        INSTALL(FILES
74
            ${CMAKE_CURRENT_BINARY_DIR}/dd.exe
75
            DESTINATION ${PKG_LIB_DIR}/utils
76
            COMPONENT utilities
77
        )
78
    ENDIF(WIN32 AND UHD_RELEASE_MODE)
79
    INSTALL(PROGRAMS
80
        usrp2_recovery.py
81
        usrp2_card_burner.py
82
        usrp2_card_burner_gui.py
83
        usrp_n2xx_net_burner.py
84
        usrp_n2xx_net_burner_gui.py
85
        DESTINATION ${PKG_LIB_DIR}/utils
86
        COMPONENT utilities
87
    )
88
ENDIF(ENABLE_USRP2)