mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-12 02:10:34 +00:00
Add more CMake modernization
This commit is contained in:
parent
9b94a4dec0
commit
f13b84c86c
165
CMakeLists.txt
165
CMakeLists.txt
@ -1475,33 +1475,6 @@ else()
|
||||
endif()
|
||||
|
||||
|
||||
################################################################################
|
||||
# USRP Hardware Driver (UHD) - OPTIONAL
|
||||
################################################################################
|
||||
if(ENABLE_UHD)
|
||||
find_package(UHD)
|
||||
if(NOT UHD_FOUND)
|
||||
set(ENABLE_UHD OFF)
|
||||
message(STATUS " The USRP Hardware Driver (UHD) signal source will not be built,")
|
||||
message(STATUS " so all USRP-based front-ends will not be usable.")
|
||||
message(STATUS " Please check https://files.ettus.com/manual/")
|
||||
else()
|
||||
set(GR_REQUIRED_COMPONENTS UHD)
|
||||
find_package(Gnuradio)
|
||||
if(NOT TARGET Gnuradio::uhd)
|
||||
add_library(Gnuradio::uhd SHARED IMPORTED)
|
||||
list(GET GNURADIO_UHD_LIBRARIES 0 FIRST_DIR)
|
||||
get_filename_component(GNURADIO_UHD_DIR ${FIRST_DIR} ABSOLUTE)
|
||||
set_target_properties(Gnuradio::uhd PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_UHD_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_UHD_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_UHD_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
################################################################################
|
||||
# Doxygen - http://www.stack.nl/~dimitri/doxygen/index.html (OPTIONAL, used if found)
|
||||
@ -1619,14 +1592,16 @@ endif()
|
||||
# CUSTOM UDP PACKET SOURCE (OPTIONAL)
|
||||
###############################################################################
|
||||
if(ENABLE_RAW_UDP)
|
||||
message(STATUS "High-optimized custom UDP ip packet source will be enabled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_RAW_UDP=OFF ../'")
|
||||
else()
|
||||
message(STATUS "High-optimized custom UDP ip packet source will be enabled.")
|
||||
message(STATUS "High-optimized custom UDP IP packet source is enabled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_RAW_UDP=OFF ../'")
|
||||
find_package(PCAP)
|
||||
if(NOT PCAP_FOUND)
|
||||
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (with ENABLE_RAW_UDP=ON)")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
# FPGA (OPTIONAL)
|
||||
###############################################################################
|
||||
@ -1643,40 +1618,38 @@ endif()
|
||||
################################################################################
|
||||
# Setup of optional drivers
|
||||
################################################################################
|
||||
if($ENV{GN3S_DRIVER})
|
||||
message(STATUS "GN3S_DRIVER environment variable found.")
|
||||
set(ENABLE_GN3S ON)
|
||||
endif()
|
||||
if(GN3S_DRIVER)
|
||||
set(ENABLE_GN3S ON)
|
||||
endif()
|
||||
if(ENABLE_GN3S)
|
||||
message(STATUS "The GN3S driver will be compiled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_GN3S=OFF ../'")
|
||||
else()
|
||||
message(STATUS "The (optional and experimental) GN3S driver is not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_GN3S=ON ../' to add support for the GN3S dongle.")
|
||||
|
||||
################################################################################
|
||||
# USRP Hardware Driver (UHD) - OPTIONAL
|
||||
################################################################################
|
||||
if(ENABLE_UHD)
|
||||
find_package(UHD)
|
||||
if(NOT UHD_FOUND)
|
||||
set(ENABLE_UHD OFF)
|
||||
message(STATUS " The USRP Hardware Driver (UHD) signal source will not be built,")
|
||||
message(STATUS " so all USRP-based front-ends will not be usable.")
|
||||
message(STATUS " Please check https://files.ettus.com/manual/")
|
||||
else()
|
||||
set(GR_REQUIRED_COMPONENTS UHD)
|
||||
find_package(Gnuradio)
|
||||
if(NOT TARGET Gnuradio::uhd)
|
||||
add_library(Gnuradio::uhd SHARED IMPORTED)
|
||||
list(GET GNURADIO_UHD_LIBRARIES 0 FIRST_DIR)
|
||||
get_filename_component(GNURADIO_UHD_DIR ${FIRST_DIR} ABSOLUTE)
|
||||
set_target_properties(Gnuradio::uhd PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_UHD_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_UHD_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_UHD_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if($ENV{RAW_ARRAY_DRIVER})
|
||||
message(STATUS "RAW_ARRAY_DRIVER environment variable found.")
|
||||
set(ENABLE_ARRAY ON)
|
||||
endif()
|
||||
|
||||
if(RAW_ARRAY_DRIVER)
|
||||
set(ENABLE_ARRAY ON)
|
||||
endif()
|
||||
|
||||
if(ENABLE_ARRAY)
|
||||
message(STATUS "CTTC's Antenna Array front-end driver will be compiled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_ARRAY=OFF ../'")
|
||||
# copy firmware to install folder
|
||||
# Build project gr-dbfcttc
|
||||
else()
|
||||
message(STATUS "The (optional) CTTC's Antenna Array front-end driver is not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_ARRAY=ON ../' to add support for the CTTC experimental array front-end.")
|
||||
endif()
|
||||
|
||||
##############################################
|
||||
# gr-osmosdr - OPTIONAL
|
||||
##############################################
|
||||
if($ENV{RTLSDR_DRIVER})
|
||||
message(STATUS "RTLSDR_DRIVER environment variable found.")
|
||||
set(ENABLE_OSMOSDR ON)
|
||||
@ -1699,6 +1672,26 @@ else()
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_OSMOSDR=ON ../' to add support for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based USB dongles, etc.)")
|
||||
endif()
|
||||
|
||||
|
||||
##############################################
|
||||
# gr-iio - OPTIONAL
|
||||
##############################################
|
||||
if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
||||
find_package(GRIIO)
|
||||
endif()
|
||||
|
||||
|
||||
##############################################
|
||||
# libiio - OPTIONAL
|
||||
##############################################
|
||||
if(ENABLE_AD9361)
|
||||
find_package(LIBIIO)
|
||||
endif()
|
||||
|
||||
|
||||
##############################################
|
||||
# TELEORBIT FLEXIBAND FRONTEND - OPTIONAL
|
||||
##############################################
|
||||
if($ENV{FLEXIBAND_DRIVER})
|
||||
message(STATUS "FLEXIBAND_DRIVER environment variable found.")
|
||||
set(ENABLE_FLEXIBAND ON)
|
||||
@ -1715,6 +1708,54 @@ else()
|
||||
message(STATUS "The (optional) Teleorbit Flexiband front-end driver adapter is not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_FLEXIBAND=ON ../' to add support for the Teleorbit Flexiband front-end.")
|
||||
endif()
|
||||
if(ENABLE_FLEXIBAND)
|
||||
find_package(TELEORBIT)
|
||||
if(NOT TELEORBIT_FOUND)
|
||||
message(FATAL_ERROR "Teleorbit Flexiband GNU Radio driver required to build gnss-sdr with the optional FLEXIBAND adapter")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
##############################################
|
||||
# GN3S - OPTIONAL
|
||||
##############################################
|
||||
if($ENV{GN3S_DRIVER})
|
||||
message(STATUS "GN3S_DRIVER environment variable found.")
|
||||
set(ENABLE_GN3S ON)
|
||||
endif()
|
||||
if(GN3S_DRIVER)
|
||||
set(ENABLE_GN3S ON)
|
||||
endif()
|
||||
if(ENABLE_GN3S)
|
||||
message(STATUS "The GN3S driver will be compiled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_GN3S=OFF ../'")
|
||||
find_package(GRGN3S QUIET)
|
||||
else()
|
||||
message(STATUS "The (optional and experimental) GN3S driver is not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_GN3S=ON ../' to add support for the GN3S dongle.")
|
||||
endif()
|
||||
|
||||
|
||||
##############################################
|
||||
# CTTC ARRAY - OPTIONAL
|
||||
##############################################
|
||||
if($ENV{RAW_ARRAY_DRIVER})
|
||||
message(STATUS "RAW_ARRAY_DRIVER environment variable found.")
|
||||
set(ENABLE_ARRAY ON)
|
||||
endif()
|
||||
|
||||
if(RAW_ARRAY_DRIVER)
|
||||
set(ENABLE_ARRAY ON)
|
||||
endif()
|
||||
|
||||
if(ENABLE_ARRAY)
|
||||
message(STATUS "CTTC's Antenna Array front-end driver will be compiled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_ARRAY=OFF ../'")
|
||||
find_package(GRDBFCTTC QUIET)
|
||||
else()
|
||||
message(STATUS "The (optional) CTTC's Antenna Array front-end driver is not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_ARRAY=ON ../' to add support for the CTTC experimental array front-end.")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
@ -53,4 +53,15 @@ find_library(
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GRDBFCTTC DEFAULT_MSG GR_DBFCTTC_LIBRARIES GR_DBFCTTC_INCLUDE_DIRS)
|
||||
|
||||
if(GRDBFCTTC_FOUND AND NOT TARGET Gnuradio::dbfcttc)
|
||||
add_library(Gnuradio::dbfcttc SHARED IMPORTED)
|
||||
set_target_properties(Gnuradio::dbfcttc PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GR_DBFCTTC_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GR_DBFCTTC_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GR_DBFCTTC_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(GR_DBFCTTC_LIBRARIES GR_DBFCTTC_INCLUDE_DIRS)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
@ -53,4 +53,15 @@ find_library(
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GRGN3S DEFAULT_MSG GR_GN3S_LIBRARIES GR_GN3S_INCLUDE_DIRS)
|
||||
|
||||
if(GRGN3S_FOUND AND NOT TARGET Gnuradio::gn3s)
|
||||
add_library(Gnuradio::gn3s SHARED IMPORTED)
|
||||
set_target_properties(Gnuradio::gn3s PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GR_GN3S_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GR_GN3S_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GR_GN3S_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(GR_GN3S_LIBRARIES GR_GN3S_INCLUDE_DIRS)
|
||||
|
@ -95,9 +95,9 @@ find_library(GROSMOSDR_LIBRARIES
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GROSMOSDR DEFAULT_MSG GROSMOSDR_LIBRARIES GROSMOSDR_INCLUDE_DIR)
|
||||
|
||||
if(GROSMOSDR_FOUND AND NOT TARGET Gnuradio:osmosdr)
|
||||
add_library(Gnuradio:osmosdr SHARED IMPORTED)
|
||||
set_target_properties(Gnuradio:osmosdr PROPERTIES
|
||||
if(GROSMOSDR_FOUND AND NOT TARGET Gnuradio::osmosdr)
|
||||
add_library(Gnuradio::osmosdr SHARED IMPORTED)
|
||||
set_target_properties(Gnuradio::osmosdr PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GROSMOSDR_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GROSMOSDR_INCLUDE_DIR};${GROSMOSDR_INCLUDE_DIR}/osmosdr"
|
||||
|
@ -79,9 +79,9 @@ find_library(
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBIIO DEFAULT_MSG LIBIIO_LIBRARIES LIBIIO_INCLUDE_DIRS)
|
||||
|
||||
if(LIBIIO_FOUND AND NOT TARGET Iio:iio)
|
||||
add_library(Iio:iio SHARED IMPORTED)
|
||||
set_target_properties(Iio:iio PROPERTIES
|
||||
if(LIBIIO_FOUND AND NOT TARGET Iio::iio)
|
||||
add_library(Iio::iio SHARED IMPORTED)
|
||||
set_target_properties(Iio::iio PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${LIBIIO_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBIIO_INCLUDE_DIRS}"
|
||||
|
@ -82,9 +82,9 @@ find_library(LIBOSMOSDR_LIBRARIES NAMES osmosdr
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBOSMOSDR DEFAULT_MSG LIBOSMOSDR_INCLUDE_DIR LIBOSMOSDR_LIBRARIES)
|
||||
|
||||
if(LIBOSMOSDR_FOUND AND NOT TARGET Osmosdr:osmosdr)
|
||||
add_library(Osmosdr:osmosdr SHARED IMPORTED)
|
||||
set_target_properties(Osmosdr:osmosdr PROPERTIES
|
||||
if(LIBOSMOSDR_FOUND AND NOT TARGET Osmosdr::osmosdr)
|
||||
add_library(Osmosdr::osmosdr SHARED IMPORTED)
|
||||
set_target_properties(Osmosdr::osmosdr PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${LIBOSMOSDR_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBOSMOSDR_INCLUDE_DIR}"
|
||||
|
@ -47,4 +47,15 @@ find_library(TELEORBIT_LIBRARIES
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(TELEORBIT DEFAULT_MSG TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS)
|
||||
|
||||
if(TELEORBIT_FOUND AND NOT TARGET Gnuradio:teleorbit)
|
||||
add_library(Gnuradio:teleorbit SHARED IMPORTED)
|
||||
set_target_properties(Gnuradio:teleorbit PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${TELEORBIT_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${TELEORBIT_INCLUDE_DIRS};${TELEORBIT_INCLUDE_DIR}/teleorbit"
|
||||
INTERFACE_LINK_LIBRARIES "${TELEORBIT_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS)
|
||||
|
@ -19,17 +19,13 @@
|
||||
|
||||
# Optional drivers
|
||||
|
||||
if(ENABLE_RAW_UDP)
|
||||
find_package(PCAP)
|
||||
if(NOT PCAP_FOUND)
|
||||
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
|
||||
endif()
|
||||
if(ENABLE_RAW_UDP AND PCAP_FOUND)
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} custom_udp_signal_source.cc)
|
||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} custom_udp_signal_source.h)
|
||||
endif()
|
||||
|
||||
|
||||
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:")
|
||||
@ -40,8 +36,8 @@ if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if(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:")
|
||||
@ -90,33 +86,16 @@ 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()
|
||||
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()
|
||||
|
||||
|
||||
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()
|
||||
# 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})
|
||||
if(ENABLE_FLEXIBAND AND TELEORBIT_FOUND)
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} flexiband_signal_source.cc)
|
||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} flexiband_signal_source.h)
|
||||
endif()
|
||||
@ -126,7 +105,6 @@ 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")
|
||||
@ -208,7 +186,6 @@ target_link_libraries(signal_source_adapters
|
||||
gnss_sp_libs
|
||||
gnss_rx
|
||||
signal_source_lib
|
||||
${OPT_LIBRARIES}
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
@ -228,8 +205,6 @@ if(ENABLE_OSMOSDR AND GROSMOSDR_FOUND)
|
||||
target_link_libraries(signal_source_adapters
|
||||
PUBLIC
|
||||
Gnuradio::osmosdr
|
||||
PRIVATE
|
||||
Osmosdr::osmosdr
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -247,9 +222,29 @@ if(ENABLE_RAW_UDP AND PCAP_FOUND)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_FLEXIBAND AND TELEORBIT_FOUND)
|
||||
target_link_libraries(signal_source_adapters
|
||||
PRIVATE
|
||||
Gnuradio::teleorbit
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_GN3S AND GRGN3S_FOUND)
|
||||
target_link_libraries(signal_source_adapters
|
||||
PRIVATE
|
||||
Gnuradio::gn3s
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_ARRAY AND GRDBFCTTC_FOUND)
|
||||
target_link_libraries(signal_source_adapters
|
||||
PRIVATE
|
||||
Gnuradio::dbfcttc
|
||||
)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(signal_source_adapters PRIVATE -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
set_property(TARGET signal_source_adapters APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${OPT_DRIVER_INCLUDE_DIRS}>
|
||||
)
|
||||
|
@ -17,11 +17,7 @@
|
||||
#
|
||||
|
||||
|
||||
if(ENABLE_RAW_UDP)
|
||||
find_package(PCAP)
|
||||
if(NOT PCAP_FOUND)
|
||||
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source")
|
||||
endif()
|
||||
if(ENABLE_RAW_UDP AND PCAP_FOUND)
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gr_complex_ip_packet_source.cc)
|
||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} gr_complex_ip_packet_source.h)
|
||||
endif()
|
||||
|
@ -17,19 +17,17 @@
|
||||
#
|
||||
|
||||
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()
|
||||
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()
|
||||
endif()
|
||||
|
||||
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:")
|
||||
|
@ -47,4 +47,5 @@ set_property(TARGET telemetry_decoder_libswiftcnav
|
||||
source_group(Headers FILES ${TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS})
|
||||
|
||||
set_target_properties(telemetry_decoder_libswiftcnav
|
||||
PROPERTIES LINKER_LANGUAGE C)
|
||||
PROPERTIES LINKER_LANGUAGE C
|
||||
)
|
||||
|
@ -121,9 +121,9 @@ if(ENABLE_ARRAY)
|
||||
target_compile_definitions(gnss_rx PRIVATE -DRAW_ARRAY_DRIVER=1)
|
||||
endif()
|
||||
|
||||
#if(ENABLE_FLEXIBAND)
|
||||
# target_compile_definitions(gnss_rx PRIVATE -DFLEXIBAND_DRIVER=1)
|
||||
#endif()
|
||||
if(ENABLE_FLEXIBAND)
|
||||
target_compile_definitions(gnss_rx PRIVATE -DFLEXIBAND_DRIVER=1)
|
||||
endif()
|
||||
|
||||
if(OPENCL_FOUND)
|
||||
message(STATUS "Adding processing blocks implemented using OpenCL")
|
||||
@ -142,10 +142,8 @@ target_link_libraries(gnss_rx
|
||||
Boost::boost
|
||||
Boost::thread
|
||||
Gnuradio::runtime
|
||||
gnss_system_parameters
|
||||
rx_core_lib
|
||||
core_monitor_lib
|
||||
gnss_sp_libs
|
||||
PRIVATE
|
||||
Glog::glog
|
||||
signal_source_adapters
|
||||
@ -159,19 +157,10 @@ target_link_libraries(gnss_rx
|
||||
telemetry_decoder_adapters
|
||||
obs_adapters
|
||||
pvt_adapters
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
)
|
||||
|
||||
if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2 OR ENABLE_AD9361)
|
||||
target_link_libraries(gnss_rx
|
||||
PRIVATE
|
||||
Iio::iio
|
||||
)
|
||||
endif()
|
||||
|
||||
set_property(TARGET gnss_rx APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/core/receiver>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/core/interfaces>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/algorithms/libs>
|
||||
$<BUILD_INTERFACE:${OPT_RECEIVER_INCLUDE_DIRS}>
|
||||
)
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "pvt_interface.h"
|
||||
#include <armadillo>
|
||||
#include <boost/asio.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/message.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <algorithm>
|
||||
|
Loading…
Reference in New Issue
Block a user