cmake: added ENABLE_NONFREE option to enable nonfree components.

soapy_support
Dimitri Stolnikov 8 years ago
parent 3793a5e8b1
commit 3916b5bc4f
  1. 12
      CMakeLists.txt
  2. 4
      lib/CMakeLists.txt

@ -33,6 +33,8 @@ if(NOT CMAKE_BUILD_TYPE)
endif(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
set(ENABLE_NONFREE FALSE CACHE BOOL "Enable or disable nonfree components.")
# Set the version information here
set(VERSION_INFO_MAJOR_VERSION 0)
set(VERSION_INFO_API_COMPAT 1)
@ -157,7 +159,9 @@ find_package(GnuradioFCDPP)
find_package(LibOsmoSDR)
find_package(LibRTLSDR)
find_package(LibMiriSDR)
if(ENABLE_NONFREE)
find_package(LibSDRplay)
endif(ENABLE_NONFREE)
find_package(LibHackRF)
find_package(LibAIRSPY)
find_package(LibbladeRF)
@ -274,5 +278,13 @@ INSTALL(
# Print Summary
########################################################################
GR_PRINT_COMPONENT_SUMMARY()
if(ENABLE_NONFREE)
MESSAGE(STATUS
"NONFREE components have been enabled. The resulting
binaries cannot be distributed under GPL terms.
"
)
endif(ENABLE_NONFREE)
MESSAGE(STATUS "Building for version: ${VERSION} / ${LIBVER}")
MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")

@ -185,10 +185,12 @@ endif(ENABLE_MIRI)
########################################################################
# Setup SDRplay component
########################################################################
GR_REGISTER_COMPONENT("SDRplay RSP" ENABLE_SDRPLAY LIBSDRPLAY_FOUND)
if(ENABLE_NONFREE)
GR_REGISTER_COMPONENT("SDRplay RSP (NONFREE)" ENABLE_SDRPLAY LIBSDRPLAY_FOUND)
if(ENABLE_SDRPLAY)
GR_INCLUDE_SUBDIRECTORY(sdrplay)
endif(ENABLE_SDRPLAY)
endif(ENABLE_NONFREE)
########################################################################
# Setup HackRF component

Loading…
Cancel
Save