mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-13 05:37:20 +00:00
Improving handling of optional processing blocks and linking libraries.
New options ENABLE_GN3S, ENABLE_RTLSDR, ENABLE_OPENCL, ENABLE_ARRAY and ENABLE_GPERFTOOLS, all set by default to OFF. Users can enable that features by 'cmake -DENABLE_XXX=ON ../ '. OpenCL is now not used by default since it was giving problems in some platforms. Old variables (RTSDR_DRIVER, GN3S_DRIVER, RAW_ARRAY_DRIVER and DISABLE_OPENCL) are still honored and can be used in the same way, but the new ENABLE_XXX are recommended for the sake of more uniform naming. Main CMakeFile.txt has been rearranged, putting options first, then searching for the required libraries, and then the optional ones. If Gperftools is enabled and found, binaries are linked to the tcmalloc and profiler libraries, and using the adequate flags. Fixed building in Mac OSX if Armadillo and OpenBLAS were not installed in the system.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
# Optional drivers
|
||||
|
||||
if($ENV{GN3S_DRIVER})
|
||||
if(ENABLE_GN3S)
|
||||
##############################################
|
||||
# GN3S (USB dongle)
|
||||
##############################################
|
||||
@@ -49,12 +49,10 @@ if($ENV{GN3S_DRIVER})
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/firmware/GN3S_v2/bin/gn3s_firmware.ihx
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/install/
|
||||
)
|
||||
endif($ENV{GN3S_DRIVER})
|
||||
endif(ENABLE_GN3S)
|
||||
|
||||
if($ENV{RAW_ARRAY_DRIVER})
|
||||
set(RAW_ARRAY_DRIVER ON)
|
||||
endif($ENV{RAW_ARRAY_DRIVER})
|
||||
if(RAW_ARRAY_DRIVER)
|
||||
|
||||
if(ENABLE_ARRAY)
|
||||
##############################################
|
||||
# GRDBFCTTC GNSS EXPERIMENTAL ARRAY PROTOTYPE
|
||||
##############################################
|
||||
@@ -82,13 +80,10 @@ if(RAW_ARRAY_DRIVER)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GRDBFCTTC_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GRDBFCTTC_INCLUDE_DIRS})
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} raw_array_signal_source.cc)
|
||||
endif(RAW_ARRAY_DRIVER)
|
||||
endif(ENABLE_ARRAY)
|
||||
|
||||
|
||||
if($ENV{RTLSDR_DRIVER})
|
||||
set(RTLSDR_DRIVER ON)
|
||||
endif($ENV{RTLSDR_DRIVER})
|
||||
if(RTLSDR_DRIVER)
|
||||
if(ENABLE_RTLSDR)
|
||||
################################################################################
|
||||
# OsmoSDR - http://sdr.osmocom.org/trac/
|
||||
################################################################################
|
||||
@@ -104,7 +99,7 @@ if(RTLSDR_DRIVER)
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} rtlsdr_signal_source.cc)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GROSMOSDR_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${RTL_DRIVER_INCLUDE_DIRS})
|
||||
endif(RTLSDR_DRIVER)
|
||||
endif(ENABLE_RTLSDR)
|
||||
|
||||
set(SIGNAL_SOURCE_ADAPTER_SOURCES file_signal_source.cc
|
||||
gen_signal_source.cc
|
||||
|
||||
Reference in New Issue
Block a user