Add more imported targets to CMake scripts

This commit is contained in:
Carles Fernandez 2019-02-04 16:07:29 +01:00
parent 4f440f63dc
commit 9b94a4dec0
21 changed files with 207 additions and 116 deletions

View File

@ -1488,6 +1488,17 @@ if(ENABLE_UHD)
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()

View File

@ -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.
#
@ -15,6 +15,12 @@
# You should have received a copy of the GNU General Public License
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
# Provides the following imported target:
# Gnuradio::iio
#
include(FindPkgConfig)
pkg_check_modules(PC_IIO gnuradio-iio)
@ -69,4 +75,15 @@ find_library(IIO_LIBRARIES
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GRIIO DEFAULT_MSG IIO_LIBRARIES IIO_INCLUDE_DIRS)
if(GRIIO_FOUND AND NOT TARGET Gnuradio::iio)
add_library(Gnuradio::iio SHARED IMPORTED)
set_target_properties(Gnuradio::iio PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${IIO_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${IIO_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${IIO_LIBRARIES}"
)
endif()
mark_as_advanced(IIO_LIBRARIES IIO_INCLUDE_DIRS)

View File

@ -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.
#
@ -33,6 +33,11 @@
# GROSMOSDR_FOUND System has gr-osmosdr libs/headers
# GROSMOSDR_LIBRARIES The gr-osmosdr libraries (gnuradio-osmosdr)
# GROSMOSDR_INCLUDE_DIR The location of gr-osmosdr headers
#
# Provides the following imported target:
# Gnuradio::osmosdr
#
include(FindPkgConfig)
pkg_check_modules(GROSMOSDR_PKG gnuradio-osmosdr)
@ -89,4 +94,15 @@ 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
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GROSMOSDR_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${GROSMOSDR_INCLUDE_DIR};${GROSMOSDR_INCLUDE_DIR}/osmosdr"
INTERFACE_LINK_LIBRARIES "${GROSMOSDR_LIBRARIES}"
)
endif()
mark_as_advanced(GROSMOSDR_LIBRARIES GROSMOSDR_INCLUDE_DIR)

View File

@ -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.
#
@ -15,6 +15,11 @@
# You should have received a copy of the GNU General Public License
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
# Provides the following imported target:
# Iio::iio
#
include(FindPkgConfig)
pkg_check_modules(PC_LIBIIO libiio)
@ -73,4 +78,15 @@ 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
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${LIBIIO_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBIIO_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${LIBIIO_LIBRARIES}"
)
endif()
mark_as_advanced(LIBIIO_LIBRARIES LIBIIO_INCLUDE_DIRS)

View File

@ -27,6 +27,10 @@
# LIBOSMOSDR_FOUND System has libosmosdr libs/headers
# LIBOSMOSDR_LIBRARIES The libosmosdr libraries
# LIBOSMOSDR_INCLUDE_DIR The location of libosmosdr headers
#
# Provides the following imported target:
# Osmosdr::osmosdr
#
include(FindPkgConfig)
pkg_check_modules(LIBOSMOSDR_PKG libosmosdr)
@ -77,4 +81,15 @@ 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
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${LIBOSMOSDR_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBOSMOSDR_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${LIBOSMOSDR_LIBRARIES}"
)
endif()
mark_as_advanced(LIBOSMOSDR_INCLUDE_DIR LIBOSMOSDR_LIBRARIES)

View File

@ -43,7 +43,10 @@
# PCAP_INCLUDE_DIRS - where to find pcap.h, etc.
# PCAP_LIBRARIES - List of libraries when using pcap.
# PCAP_FOUND - True if pcap found.
#
# Provides the following imported target:
# Pcap::pcap
#
if(EXISTS $ENV{PCAPDIR})
find_path(PCAP_INCLUDE_DIR
@ -113,10 +116,20 @@ check_function_exists("pcap_list_datalinks" HAVE_PCAP_LIST_DATALINKS)
check_function_exists("pcap_open_dead" HAVE_PCAP_OPEN_DEAD)
check_function_exists("pcap_set_datalink" HAVE_PCAP_SET_DATALINK)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PCAP DEFAULT_MSG PCAP_INCLUDE_DIRS PCAP_LIBRARIES)
if(PCAP_FOUND AND NOT TARGET Pcap::pcap)
add_library(Pcap::pcap SHARED IMPORTED)
set_target_properties(Pcap::pcap PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${PCAP_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${PCAP_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${PCAP_LIBRARIES}"
)
endif()
mark_as_advanced(
PCAP_LIBRARIES
PCAP_INCLUDE_DIRS
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PCAP DEFAULT_MSG PCAP_INCLUDE_DIRS PCAP_LIBRARIES)

View File

@ -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.
#
@ -15,10 +15,14 @@
# You should have received a copy of the GNU General Public License
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
# Provides the following imported target:
# Iio::iio
#
########################################################################
# Find the library for the USRP Hardware Driver
########################################################################
include(FindPkgConfig)
pkg_check_modules(PC_UHD uhd)
@ -72,4 +76,15 @@ find_library(UHD_LIBRARIES
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(UHD DEFAULT_MSG UHD_LIBRARIES UHD_INCLUDE_DIRS)
if(UHD_FOUND AND NOT TARGET Uhd::uhd)
add_library(Uhd::uhd SHARED IMPORTED)
set_target_properties(Uhd::uhd PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${UHD_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${UHD_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${UHD_LIBRARIES}"
)
endif()
mark_as_advanced(UHD_LIBRARIES UHD_INCLUDE_DIRS)

View File

@ -50,6 +50,9 @@
*
*----------------------------------------------------------------------------*/
#include "rtklib_stream.h"
#include "rtklib_rtkcmn.h"
#include "rtklib_solution.h"
#include <arpa/inet.h>
#include <cctype>
#include <cerrno>
@ -57,9 +60,6 @@
#include <fcntl.h>
#include <netdb.h>
#include <netinet/tcp.h>
#include <rtklib_rtkcmn.h>
#include <rtklib_solution.h>
#include <rtklib_stream.h>
#include <string>
#include <sys/socket.h>
#include <sys/stat.h>

View File

@ -24,9 +24,6 @@ if(ENABLE_RAW_UDP)
if(NOT PCAP_FOUND)
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (ENABLE_RAW_UDP)")
endif()
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
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()
@ -41,8 +38,6 @@ if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
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()
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
endif()
if(ENABLE_AD9361)
@ -55,8 +50,6 @@ if(ENABLE_AD9361)
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()
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${LIBIIO_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${LIBIIO_INCLUDE_DIRS})
endif()
@ -154,15 +147,8 @@ if(ENABLE_OSMOSDR)
list(REMOVE_ITEM SIGNAL_SOURCE_ADAPTER_HEADERS ${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters/osmosdr_signal_source.h)
endif()
else()
# set OSMO include dirs
set(OSMO_DRIVER_INCLUDE_DIRS
${OPT_DRIVER_INCLUDE_DIRS}
${GROSMOSDR_INCLUDE_DIR}/osmosdr
)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} osmosdr_signal_source.cc)
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} osmosdr_signal_source.h)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${GROSMOSDR_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${OSMO_DRIVER_INCLUDE_DIRS})
endif()
endif()
@ -170,8 +156,6 @@ endif()
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)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${UHD_LIBRARIES} ${GNURADIO_UHD_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${UHD_INCLUDE_DIRS})
endif()
@ -206,14 +190,13 @@ if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
two_bit_packed_file_signal_source.h)
endif()
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS)
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})
add_library(signal_source_adapters ${SIGNAL_SOURCE_ADAPTER_SOURCES} ${SIGNAL_SOURCE_ADAPTER_HEADERS})
target_include_directories(signal_source_adapters PUBLIC ${CMAKE_SOURCE_DIR}/src/algorithms/libs)
target_link_libraries(signal_source_adapters
@ -232,6 +215,38 @@ target_link_libraries(signal_source_adapters
Volk::volk
)
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
target_link_libraries(signal_source_adapters
PUBLIC
Gnuradio::uhd
PRIVATE
Uhd::uhd
)
endif()
if(ENABLE_OSMOSDR AND GROSMOSDR_FOUND)
target_link_libraries(signal_source_adapters
PUBLIC
Gnuradio::osmosdr
PRIVATE
Osmosdr::osmosdr
)
endif()
if(ENABLE_AD9361 AND LIBIIO_FOUND)
target_link_libraries(signal_source_adapters
PRIVATE
Osmosdr::osmosdr
)
endif()
if(ENABLE_RAW_UDP AND PCAP_FOUND)
target_link_libraries(signal_source_adapters
PRIVATE
Pcap::pcap
)
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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2012-2018 (see AUTHORS file for a list of contributors)
# Copyright (C) 2012-2019 (see AUTHORS file for a list of contributors)
#
# This file is part of GNSS-SDR.
#
@ -22,9 +22,6 @@ if(ENABLE_RAW_UDP)
if(NOT PCAP_FOUND)
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source")
endif()
get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS})
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()
@ -55,11 +52,6 @@ set(SIGNAL_SOURCE_GR_BLOCKS_HEADERS
${OPT_DRIVER_HEADERS}
)
include_directories(
${OPT_DRIVER_INCLUDE_DIRS}
)
list(SORT SIGNAL_SOURCE_GR_BLOCKS_HEADERS)
list(SORT SIGNAL_SOURCE_GR_BLOCKS_SOURCES)
@ -75,15 +67,18 @@ target_link_libraries(signal_source_gr_blocks
signal_source_lib
Gnuradio::runtime
Boost::thread
${OPT_LIBRARIES}
PRIVATE
Gflags::gflags
Glog::glog
)
target_include_directories(signal_source_gr_blocks PUBLIC ${OPT_DRIVER_INCLUDE_DIRS})
if(ENABLE_RAW_UDP AND PCAP_FOUND)
target_link_libraries(signal_source_gr_blocks
PUBLIC
Pcap::pcap
)
endif()
set_property(TARGET signal_source_gr_blocks APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${OPT_DRIVER_INCLUDE_DIRS}>
)

View File

@ -26,27 +26,18 @@ if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
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()
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
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:")
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()
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)
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")
else()
set(OPT_SIGNAL_SOURCE_LIB_SOURCES ad9361_manager.cc)
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ad9361_manager.h)
endif()
@ -79,14 +70,26 @@ source_group(Headers FILES ${SIGNAL_SOURCE_LIB_HEADERS})
target_link_libraries(signal_source_lib
PUBLIC
Boost::boost
${OPT_LIBRARIES}
PRIVATE
Glog::glog
)
target_include_directories(signal_source_lib PUBLIC ${OPT_DRIVER_INCLUDE_DIRS})
if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
target_link_libraries(signal_source_lib
PUBLIC
Gnuradio::iio
PRIVATE
Iio::iio
)
endif()
if(ENABLE_FMCOMMS2 OR ENABLE_AD9361)
target_link_libraries(signal_source_lib
PUBLIC
Iio::iio
)
endif()
set_property(TARGET signal_source_lib APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${OPT_DRIVER_INCLUDE_DIRS}>
)

View File

@ -44,11 +44,10 @@ target_link_libraries(rx_core_lib
supl_library
gnss_system_parameters
Boost::boost
Glog::glog
PRIVATE
Glog::glog
Boost::serialization
Pugixml::pugixml
Gflags::gflags
)
set_property(TARGET rx_core_lib

View File

@ -32,6 +32,7 @@
*/
#include "gnss_sdr_supl_client.h"
#include <glog/logging.h>
#include <pugixml.hpp>
#include <cmath>
#include <utility>

View File

@ -57,7 +57,6 @@ extern "C"
#include <boost/archive/xml_iarchive.hpp>
#include <boost/archive/xml_oarchive.hpp>
#include <boost/serialization/map.hpp>
#include <glog/logging.h>
#include <fstream>
#include <map>
#include <string>

View File

@ -40,25 +40,6 @@ set(GNSS_RECEIVER_HEADERS
control_message.h
)
if(ENABLE_PLUTOSDR)
set(OPT_RECEIVER_INCLUDE_DIRS
${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}
)
endif()
if(ENABLE_FMCOMMS2)
set(OPT_RECEIVER_INCLUDE_DIRS
${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}
)
endif()
if(ENABLE_AD9361)
set(OPT_RECEIVER_INCLUDE_DIRS
${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}
)
endif()
if(ENABLE_CUDA)
set(OPT_RECEIVER_INCLUDE_DIRS
${OPT_RECEIVER_INCLUDE_DIRS} ${CUDA_INCLUDE_DIRS}
@ -95,68 +76,64 @@ if(ENABLE_FPGA)
endif()
if(ENABLE_RAW_UDP)
target_compile_definitions(gnss_rx PUBLIC -DRAW_UDP=1)
target_compile_definitions(gnss_rx PRIVATE -DRAW_UDP=1)
endif()
if(Boost_VERSION LESS 105000)
target_compile_definitions(gnss_rx PUBLIC -DOLD_BOOST=1)
endif()
if(OPENSSL_FOUND)
target_compile_definitions(gnss_rx PUBLIC -DUSE_OPENSSL_FALLBACK=1)
target_compile_definitions(gnss_rx PRIVATE -DOLD_BOOST=1)
endif()
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
target_compile_definitions(gnss_rx PUBLIC -DMODERN_GNURADIO=1)
target_compile_definitions(gnss_rx PRIVATE -DMODERN_GNURADIO=1)
endif()
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
target_compile_definitions(gnss_rx PUBLIC -DGR_GREATER_38=1)
target_compile_definitions(gnss_rx PRIVATE -DGR_GREATER_38=1)
endif()
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
target_compile_definitions(gnss_rx PUBLIC -DUHD_DRIVER=1)
target_compile_definitions(gnss_rx PRIVATE -DUHD_DRIVER=1)
endif()
if(ENABLE_PLUTOSDR)
target_compile_definitions(gnss_rx PUBLIC -DPLUTOSDR_DRIVER=1)
target_compile_definitions(gnss_rx PRIVATE -DPLUTOSDR_DRIVER=1)
endif()
if(ENABLE_FMCOMMS2)
target_compile_definitions(gnss_rx PUBLIC -DFMCOMMS2_DRIVER=1)
target_compile_definitions(gnss_rx PRIVATE -DFMCOMMS2_DRIVER=1)
endif()
if(ENABLE_AD9361)
target_compile_definitions(gnss_rx PUBLIC -DAD9361_DRIVER=1)
target_compile_definitions(gnss_rx PRIVATE -DAD9361_DRIVER=1)
endif()
if(ENABLE_OSMOSDR)
if(GROSMOSDR_FOUND)
target_compile_definitions(gnss_rx PUBLIC -DOSMOSDR_DRIVER=1)
target_compile_definitions(gnss_rx PRIVATE -DOSMOSDR_DRIVER=1)
endif()
endif()
if(ENABLE_GN3S)
target_compile_definitions(gnss_rx PUBLIC -DGN3S_DRIVER=1)
target_compile_definitions(gnss_rx PRIVATE -DGN3S_DRIVER=1)
endif()
if(ENABLE_ARRAY)
target_compile_definitions(gnss_rx PUBLIC -DRAW_ARRAY_DRIVER=1)
target_compile_definitions(gnss_rx PRIVATE -DRAW_ARRAY_DRIVER=1)
endif()
if(ENABLE_FLEXIBAND)
target_compile_definitions(gnss_rx PUBLIC -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")
target_compile_definitions(gnss_rx PUBLIC -DOPENCL_BLOCKS=1)
target_compile_definitions(gnss_rx PRIVATE -DOPENCL_BLOCKS=1)
else()
target_compile_definitions(gnss_rx PUBLIC -DOPENCL_BLOCKS=0)
target_compile_definitions(gnss_rx PRIVATE -DOPENCL_BLOCKS=0)
endif()
if(ENABLE_CUDA)
target_compile_definitions(gnss_rx PUBLIC -DCUDA_GPU_ACCEL=1)
target_compile_definitions(gnss_rx PRIVATE -DCUDA_GPU_ACCEL=1)
endif()
@ -185,6 +162,13 @@ target_link_libraries(gnss_rx
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>

View File

@ -115,10 +115,9 @@ target_link_libraries(gnss_system_parameters
Boost::date_time
Boost::serialization
gnss_rx
rtklib_lib
PRIVATE
Gflags::gflags
Glog::glog
PRIVATE
Gflags::gflags
)
set_property(TARGET gnss_system_parameters

View File

@ -32,8 +32,6 @@
#ifndef GNSS_SDR_BEIDOU_DNAV_EPHEMERIS_H_
#define GNSS_SDR_BEIDOU_DNAV_EPHEMERIS_H_
#include "boost/assign.hpp"
#include <boost/serialization/nvp.hpp>
#include <map>
#include <string>

View File

@ -32,8 +32,6 @@
#ifndef GNSS_SDR_BEIDOU_DNAV_IONO_H_
#define GNSS_SDR_BEIDOU_DNAV_IONO_H_
#include "boost/assign.hpp"
#include <boost/serialization/nvp.hpp>

View File

@ -33,7 +33,6 @@
#ifndef GNSS_SDR_BEIDOU_DNAV_UTC_MODEL_H_
#define GNSS_SDR_BEIDOU_DNAV_UTC_MODEL_H_
#include <boost/assign.hpp>
#include <boost/serialization/nvp.hpp>

View File

@ -33,7 +33,6 @@
#ifndef GNSS_SDR_GALILEO_EPHEMERIS_H_
#define GNSS_SDR_GALILEO_EPHEMERIS_H_
#include <boost/assign.hpp>
#include <boost/serialization/nvp.hpp>
#include <cstdint>

View File

@ -35,7 +35,6 @@
#include <boost/crc.hpp>
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/dynamic_bitset.hpp>
#include <glog/logging.h>
#include <algorithm> // for std::reverse
#include <chrono> // std::chrono::seconds
#include <cmath> // for std::fmod