mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-25 19:44:55 +00:00
Apply some style rules to CMake scripts
This commit is contained in:
@@ -81,6 +81,7 @@ if(ENABLE_FMCOMMS2)
|
||||
endif(GRIIO_FOUND)
|
||||
endif(ENABLE_FMCOMMS2)
|
||||
|
||||
|
||||
if(ENABLE_AD9361)
|
||||
###############################################
|
||||
# AD9361 DIRECT TO FPGA Hardware
|
||||
@@ -92,57 +93,55 @@ if(ENABLE_AD9361)
|
||||
endif(ENABLE_AD9361)
|
||||
|
||||
|
||||
|
||||
if(ENABLE_GN3S)
|
||||
##############################################
|
||||
# GN3S (USB dongle)
|
||||
##############################################
|
||||
find_package(GRGN3S REQUIRED)
|
||||
if(NOT GRGN3S_FOUND)
|
||||
message(" gr-gn3s not found, install it from https://github.com/gnss-sdr/gr-gn3s ")
|
||||
message(FATAL_ERROR "gr-gn3s required for building gnss-sdr with this option enabled")
|
||||
endif(NOT GRGN3S_FOUND)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_GN3S_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_GN3S_INCLUDE_DIRS})
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gn3s_signal_source.cc)
|
||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} gn3s_signal_source.h)
|
||||
##############################################
|
||||
# GN3S (USB dongle)
|
||||
##############################################
|
||||
find_package(GRGN3S REQUIRED)
|
||||
if(NOT GRGN3S_FOUND)
|
||||
message(" gr-gn3s not found, install it from https://github.com/gnss-sdr/gr-gn3s ")
|
||||
message(FATAL_ERROR "gr-gn3s required for building gnss-sdr with this option enabled")
|
||||
endif(NOT GRGN3S_FOUND)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_GN3S_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_GN3S_INCLUDE_DIRS})
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gn3s_signal_source.cc)
|
||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} gn3s_signal_source.h)
|
||||
endif(ENABLE_GN3S)
|
||||
|
||||
|
||||
if(ENABLE_FLEXIBAND)
|
||||
##############################################
|
||||
# TELEORBIT FLEXIBAND FRONTEND ADAPTER
|
||||
##############################################
|
||||
find_package(TELEORBIT REQUIRED)
|
||||
if(NOT TELEORBIT_FOUND)
|
||||
message(FATAL_ERROR "Teleorbit Flexiband GNU Radio driver required to build gnss-sdr with the optional FLEXIBAND adapter")
|
||||
endif(NOT TELEORBIT_FOUND)
|
||||
|
||||
# Set up variables
|
||||
set(FLEXIBAND_DRIVER_INCLUDE_DIRS
|
||||
${OPT_DRIVER_INCLUDE_DIRS}
|
||||
${TELEORBIT_INCLUDE_DIR}/teleorbit
|
||||
)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${TELEORBIT_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${FLEXIBAND_DRIVER_INCLUDE_DIRS})
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} flexiband_signal_source.cc)
|
||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} flexiband_signal_source.h)
|
||||
##############################################
|
||||
# TELEORBIT FLEXIBAND FRONTEND ADAPTER
|
||||
##############################################
|
||||
find_package(TELEORBIT REQUIRED)
|
||||
if(NOT TELEORBIT_FOUND)
|
||||
message(FATAL_ERROR "Teleorbit Flexiband GNU Radio driver required to build gnss-sdr with the optional FLEXIBAND adapter")
|
||||
endif(NOT TELEORBIT_FOUND)
|
||||
# Set up variables
|
||||
set(FLEXIBAND_DRIVER_INCLUDE_DIRS
|
||||
${OPT_DRIVER_INCLUDE_DIRS}
|
||||
${TELEORBIT_INCLUDE_DIR}/teleorbit
|
||||
)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${TELEORBIT_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${FLEXIBAND_DRIVER_INCLUDE_DIRS})
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} flexiband_signal_source.cc)
|
||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} flexiband_signal_source.h)
|
||||
endif(ENABLE_FLEXIBAND)
|
||||
|
||||
|
||||
if(ENABLE_ARRAY)
|
||||
##############################################
|
||||
# DBFCTTC GNSS EXPERIMENTAL ARRAY PROTOTYPE
|
||||
##############################################
|
||||
find_package(GRDBFCTTC REQUIRED)
|
||||
if(NOT GRDBFCTTC_FOUND)
|
||||
message(" gr-dbfcttc not found, install it from https://github.com/gnss-sdr/gr-dbfcttc ")
|
||||
message(FATAL_ERROR "gr-dbfcttc required for building gnss-sdr with this option enabled")
|
||||
endif(NOT GRDBFCTTC_FOUND)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_DBFCTTC_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_DBFCTTC_INCLUDE_DIRS})
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} raw_array_signal_source.cc)
|
||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} raw_array_signal_source.h)
|
||||
##############################################
|
||||
# DBFCTTC GNSS EXPERIMENTAL ARRAY PROTOTYPE
|
||||
##############################################
|
||||
find_package(GRDBFCTTC REQUIRED)
|
||||
if(NOT GRDBFCTTC_FOUND)
|
||||
message(" gr-dbfcttc not found, install it from https://github.com/gnss-sdr/gr-dbfcttc ")
|
||||
message(FATAL_ERROR "gr-dbfcttc required for building gnss-sdr with this option enabled")
|
||||
endif(NOT GRDBFCTTC_FOUND)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GR_DBFCTTC_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${GR_DBFCTTC_INCLUDE_DIRS})
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} raw_array_signal_source.cc)
|
||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} raw_array_signal_source.h)
|
||||
endif(ENABLE_ARRAY)
|
||||
|
||||
|
||||
@@ -167,6 +166,7 @@ if(ENABLE_OSMOSDR)
|
||||
endif(NOT GROSMOSDR_FOUND)
|
||||
endif(ENABLE_OSMOSDR)
|
||||
|
||||
|
||||
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} uhd_signal_source.cc)
|
||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} uhd_signal_source.h)
|
||||
@@ -197,27 +197,27 @@ set(SIGNAL_SOURCE_ADAPTER_HEADERS file_signal_source.h
|
||||
|
||||
|
||||
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
|
||||
set(SIGNAL_SOURCE_ADAPTER_SOURCES ${SIGNAL_SOURCE_ADAPTER_SOURCES}
|
||||
two_bit_cpx_file_signal_source.cc
|
||||
two_bit_packed_file_signal_source.cc )
|
||||
set(SIGNAL_SOURCE_ADAPTER_HEADERS ${SIGNAL_SOURCE_ADAPTER_HEADERS}
|
||||
two_bit_cpx_file_signal_source.h
|
||||
two_bit_packed_file_signal_source.h )
|
||||
set(SIGNAL_SOURCE_ADAPTER_SOURCES ${SIGNAL_SOURCE_ADAPTER_SOURCES}
|
||||
two_bit_cpx_file_signal_source.cc
|
||||
two_bit_packed_file_signal_source.cc)
|
||||
set(SIGNAL_SOURCE_ADAPTER_HEADERS ${SIGNAL_SOURCE_ADAPTER_HEADERS}
|
||||
two_bit_cpx_file_signal_source.h
|
||||
two_bit_packed_file_signal_source.h)
|
||||
endif(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${OPT_DRIVER_INCLUDE_DIRS}
|
||||
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/libs
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/gnuradio_blocks
|
||||
${GLOG_INCLUDE_DIRS}
|
||||
${GFlags_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${GNURADIO_RUNTIME_INCLUDE_DIRS}
|
||||
${VOLK_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${OPT_DRIVER_INCLUDE_DIRS}
|
||||
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/libs
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/gnuradio_blocks
|
||||
${GLOG_INCLUDE_DIRS}
|
||||
${GFlags_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${GNURADIO_RUNTIME_INCLUDE_DIRS}
|
||||
${VOLK_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
if(ARCH_64BITS)
|
||||
@@ -232,9 +232,9 @@ list(SORT SIGNAL_SOURCE_ADAPTER_SOURCES)
|
||||
add_library(signal_source_adapters ${SIGNAL_SOURCE_ADAPTER_SOURCES} ${SIGNAL_SOURCE_ADAPTER_HEADERS})
|
||||
source_group(Headers FILES ${SIGNAL_SOURCE_ADAPTER_HEADERS})
|
||||
target_link_libraries(signal_source_adapters signal_source_gr_blocks
|
||||
${Boost_LIBRARIES}
|
||||
${GNURADIO_PMT_LIBRARIES}
|
||||
${GNURADIO_BLOCKS_LIBRARIES}
|
||||
${OPT_LIBRARIES}
|
||||
gnss_sp_libs
|
||||
${Boost_LIBRARIES}
|
||||
${GNURADIO_PMT_LIBRARIES}
|
||||
${GNURADIO_BLOCKS_LIBRARIES}
|
||||
${OPT_LIBRARIES}
|
||||
gnss_sp_libs
|
||||
)
|
||||
|
||||
@@ -31,38 +31,39 @@ endif(ENABLE_RAW_UDP)
|
||||
|
||||
|
||||
set(SIGNAL_SOURCE_GR_BLOCKS_SOURCES
|
||||
unpack_byte_2bit_samples.cc
|
||||
unpack_byte_2bit_cpx_samples.cc
|
||||
unpack_byte_4bit_samples.cc
|
||||
unpack_intspir_1bit_samples.cc
|
||||
rtl_tcp_signal_source_c.cc
|
||||
unpack_2bit_samples.cc
|
||||
unpack_spir_gss6450_samples.cc
|
||||
labsat23_source.cc
|
||||
${OPT_DRIVER_SOURCES}
|
||||
unpack_byte_2bit_samples.cc
|
||||
unpack_byte_2bit_cpx_samples.cc
|
||||
unpack_byte_4bit_samples.cc
|
||||
unpack_intspir_1bit_samples.cc
|
||||
rtl_tcp_signal_source_c.cc
|
||||
unpack_2bit_samples.cc
|
||||
unpack_spir_gss6450_samples.cc
|
||||
labsat23_source.cc
|
||||
${OPT_DRIVER_SOURCES}
|
||||
)
|
||||
|
||||
|
||||
set(SIGNAL_SOURCE_GR_BLOCKS_HEADERS
|
||||
unpack_byte_2bit_samples.h
|
||||
unpack_byte_2bit_cpx_samples.h
|
||||
unpack_byte_4bit_samples.h
|
||||
unpack_intspir_1bit_samples.h
|
||||
rtl_tcp_signal_source_c.h
|
||||
unpack_2bit_samples.h
|
||||
unpack_spir_gss6450_samples.h
|
||||
labsat23_source.h
|
||||
${OPT_DRIVER_HEADERS}
|
||||
unpack_byte_2bit_samples.h
|
||||
unpack_byte_2bit_cpx_samples.h
|
||||
unpack_byte_4bit_samples.h
|
||||
unpack_intspir_1bit_samples.h
|
||||
rtl_tcp_signal_source_c.h
|
||||
unpack_2bit_samples.h
|
||||
unpack_spir_gss6450_samples.h
|
||||
labsat23_source.h
|
||||
${OPT_DRIVER_HEADERS}
|
||||
)
|
||||
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/libs
|
||||
${GLOG_INCLUDE_DIRS}
|
||||
${GFlags_INCLUDE_DIRS}
|
||||
${GNURADIO_RUNTIME_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${OPT_DRIVER_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/libs
|
||||
${GLOG_INCLUDE_DIRS}
|
||||
${GFlags_INCLUDE_DIRS}
|
||||
${GNURADIO_RUNTIME_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${OPT_DRIVER_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
list(SORT SIGNAL_SOURCE_GR_BLOCKS_HEADERS)
|
||||
|
||||
@@ -17,64 +17,64 @@
|
||||
#
|
||||
|
||||
if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
||||
find_package(GRIIO REQUIRED)
|
||||
if(NOT GRIIO_FOUND)
|
||||
message(STATUS "gnuradio-iio not found, its installation is required.")
|
||||
message(STATUS "Please build and install the following projects:")
|
||||
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
|
||||
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
||||
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
||||
message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with this option enabled")
|
||||
endif(NOT GRIIO_FOUND)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
|
||||
find_package(GRIIO REQUIRED)
|
||||
if(NOT GRIIO_FOUND)
|
||||
message(STATUS "gnuradio-iio not found, its installation is required.")
|
||||
message(STATUS "Please build and install the following projects:")
|
||||
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
|
||||
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
||||
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
||||
message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with this option enabled")
|
||||
endif(NOT GRIIO_FOUND)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
|
||||
endif(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
||||
|
||||
if(ENABLE_FMCOMMS2 OR ENABLE_AD9361)
|
||||
find_package(LIBIIO REQUIRED)
|
||||
if(NOT LIBIIO_FOUND)
|
||||
message(STATUS "libiio not found, its installation is required.")
|
||||
message(STATUS "Please build and install the following projects:")
|
||||
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
|
||||
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
||||
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
||||
message(FATAL_ERROR "libiio is required for building gnss-sdr with this option enabled")
|
||||
endif(NOT LIBIIO_FOUND)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${LIBIIO_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${LIBIIO_INCLUDE_DIRS})
|
||||
find_package(LIBIIO REQUIRED)
|
||||
if(NOT LIBIIO_FOUND)
|
||||
message(STATUS "libiio not found, its installation is required.")
|
||||
message(STATUS "Please build and install the following projects:")
|
||||
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
|
||||
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
||||
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
||||
message(FATAL_ERROR "libiio is required for building gnss-sdr with this option enabled")
|
||||
endif(NOT LIBIIO_FOUND)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${LIBIIO_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${LIBIIO_INCLUDE_DIRS})
|
||||
|
||||
###############################################
|
||||
# FMCOMMS2 based SDR Hardware
|
||||
###############################################
|
||||
if(LIBIIO_FOUND)
|
||||
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ad9361_manager.cc)
|
||||
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ad9361_manager.h)
|
||||
endif(LIBIIO_FOUND)
|
||||
###############################################
|
||||
# FMCOMMS2 based SDR Hardware
|
||||
###############################################
|
||||
if(LIBIIO_FOUND)
|
||||
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ad9361_manager.cc)
|
||||
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ad9361_manager.h)
|
||||
endif(LIBIIO_FOUND)
|
||||
endif(ENABLE_FMCOMMS2 OR ENABLE_AD9361)
|
||||
|
||||
if(ENABLE_FPGA OR ENABLE_AD9361)
|
||||
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ${OPT_SIGNAL_SOURCE_LIB_SOURCES} fpga_switch.cc)
|
||||
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ${OPT_SIGNAL_SOURCE_LIB_HEADERS} fpga_switch.h)
|
||||
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ${OPT_SIGNAL_SOURCE_LIB_SOURCES} fpga_switch.cc)
|
||||
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ${OPT_SIGNAL_SOURCE_LIB_HEADERS} fpga_switch.h)
|
||||
endif(ENABLE_FPGA OR ENABLE_AD9361)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${GLOG_INCLUDE_DIRS}
|
||||
${GFlags_INCLUDE_DIRS}
|
||||
${OPT_DRIVER_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${GLOG_INCLUDE_DIRS}
|
||||
${GFlags_INCLUDE_DIRS}
|
||||
${OPT_DRIVER_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(SIGNAL_SOURCE_LIB_SOURCES
|
||||
rtl_tcp_commands.cc
|
||||
rtl_tcp_dongle_info.cc
|
||||
${OPT_SIGNAL_SOURCE_LIB_SOURCES}
|
||||
rtl_tcp_commands.cc
|
||||
rtl_tcp_dongle_info.cc
|
||||
${OPT_SIGNAL_SOURCE_LIB_SOURCES}
|
||||
)
|
||||
|
||||
set(SIGNAL_SOURCE_LIB_HEADERS
|
||||
rtl_tcp_commands.h
|
||||
rtl_tcp_dongle_info.h
|
||||
${OPT_SIGNAL_SOURCE_LIB_HEADERS}
|
||||
rtl_tcp_commands.h
|
||||
rtl_tcp_dongle_info.h
|
||||
${OPT_SIGNAL_SOURCE_LIB_HEADERS}
|
||||
)
|
||||
|
||||
list(SORT SIGNAL_SOURCE_LIB_HEADERS)
|
||||
|
||||
Reference in New Issue
Block a user