Provide the option to not link against uhd

This commit is contained in:
Carles Fernandez 2018-03-26 19:23:43 +02:00
parent 0c3a54ca60
commit 1449d03952
1 changed files with 14 additions and 13 deletions

View File

@ -41,9 +41,10 @@ endif(NOT CMAKE_PREFIX_PATH)
######################################################################## ########################################################################
# Determine optional blocks/libraries to be built (default: not built) # Determine optional blocks/libraries to be built (default: not built)
# Enable them here or at the command line by doing 'cmake -DENABLE_XXX=ON ../' # Enable them at the command line by doing 'cmake -DENABLE_XXX=ON ../'
######################################################################## ########################################################################
# Support of optional RF front-ends # Support of optional RF front-ends
option(ENABLE_UHD "Enable the use of UHD (driver for all USRP devices)" ON)
option(ENABLE_OSMOSDR "Enable the use of OsmoSDR and other front-ends (RTL-based dongles, HackRF, bladeRF, etc.) as signal source (experimental)" OFF) option(ENABLE_OSMOSDR "Enable the use of OsmoSDR and other front-ends (RTL-based dongles, HackRF, bladeRF, etc.) as signal source (experimental)" OFF)
option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Teleorbit Flexiband GNURadio driver" OFF) option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Teleorbit Flexiband GNURadio driver" OFF)
option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal source (experimental)" OFF) option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal source (experimental)" OFF)
@ -1195,18 +1196,18 @@ endif(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_V
################################################################################ ################################################################################
# USRP Hardware Driver (UHD) - OPTIONAL # USRP Hardware Driver (UHD) - OPTIONAL
################################################################################ ################################################################################
find_package(UHD) if(ENABLE_UHD)
if(NOT UHD_FOUND) find_package(UHD)
set(ENABLE_UHD OFF) if(NOT UHD_FOUND)
message(STATUS " The USRP Hardware Driver (UHD) signal source will not be built,") set(ENABLE_UHD OFF)
message(STATUS " so all USRP-based front-ends will not be usable.") message(STATUS " The USRP Hardware Driver (UHD) signal source will not be built,")
message(STATUS " Please check http://files.ettus.com/manual/") message(STATUS " so all USRP-based front-ends will not be usable.")
else(NOT UHD_FOUND) message(STATUS " Please check http://files.ettus.com/manual/")
set(GR_REQUIRED_COMPONENTS UHD) else(NOT UHD_FOUND)
find_package(Gnuradio) set(GR_REQUIRED_COMPONENTS UHD)
set(ENABLE_UHD ON) find_package(Gnuradio)
endif(NOT UHD_FOUND) endif(NOT UHD_FOUND)
endif(ENABLE_UHD)
################################################################################ ################################################################################