forked from sdr/gr-osmosdr
cmake: added ENABLE_NONFREE option to enable nonfree components.
This commit is contained in:
parent
3793a5e8b1
commit
3916b5bc4f
|
@ -33,6 +33,8 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||||
endif(NOT CMAKE_BUILD_TYPE)
|
endif(NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
|
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 the version information here
|
||||||
set(VERSION_INFO_MAJOR_VERSION 0)
|
set(VERSION_INFO_MAJOR_VERSION 0)
|
||||||
set(VERSION_INFO_API_COMPAT 1)
|
set(VERSION_INFO_API_COMPAT 1)
|
||||||
|
@ -157,7 +159,9 @@ find_package(GnuradioFCDPP)
|
||||||
find_package(LibOsmoSDR)
|
find_package(LibOsmoSDR)
|
||||||
find_package(LibRTLSDR)
|
find_package(LibRTLSDR)
|
||||||
find_package(LibMiriSDR)
|
find_package(LibMiriSDR)
|
||||||
|
if(ENABLE_NONFREE)
|
||||||
find_package(LibSDRplay)
|
find_package(LibSDRplay)
|
||||||
|
endif(ENABLE_NONFREE)
|
||||||
find_package(LibHackRF)
|
find_package(LibHackRF)
|
||||||
find_package(LibAIRSPY)
|
find_package(LibAIRSPY)
|
||||||
find_package(LibbladeRF)
|
find_package(LibbladeRF)
|
||||||
|
@ -274,5 +278,13 @@ INSTALL(
|
||||||
# Print Summary
|
# Print Summary
|
||||||
########################################################################
|
########################################################################
|
||||||
GR_PRINT_COMPONENT_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 "Building for version: ${VERSION} / ${LIBVER}")
|
||||||
MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")
|
MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
|
@ -185,10 +185,12 @@ endif(ENABLE_MIRI)
|
||||||
########################################################################
|
########################################################################
|
||||||
# Setup SDRplay component
|
# 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)
|
if(ENABLE_SDRPLAY)
|
||||||
GR_INCLUDE_SUBDIRECTORY(sdrplay)
|
GR_INCLUDE_SUBDIRECTORY(sdrplay)
|
||||||
endif(ENABLE_SDRPLAY)
|
endif(ENABLE_SDRPLAY)
|
||||||
|
endif(ENABLE_NONFREE)
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Setup HackRF component
|
# Setup HackRF component
|
||||||
|
|
Loading…
Reference in New Issue