Update to modern CMake usage

This commit is contained in:
Carles Fernandez 2019-02-03 19:24:44 +01:00
parent f3eef2f513
commit 8ae72fe458
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
72 changed files with 1387 additions and 1258 deletions

View File

@ -1,4 +1,4 @@
# Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
# Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
#
# This file is part of GNSS-SDR.
#
@ -503,6 +503,70 @@ if(NOT Boost_FOUND)
message(FATAL_ERROR "Fatal error: Boost (version >=${GNSSSDR_BOOST_MIN_VERSION}) required.")
endif()
if(CMAKE_VERSION VERSION_LESS 3.5)
if(NOT TARGET Boost::boost)
add_library(Boost::boost SHARED IMPORTED) # Trick for CMake 2.8.12
set_property(TARGET Boost::boost PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
set_property(TARGET Boost::boost PROPERTY
IMPORTED_LOCATION ${Boost_DATE_TIME_LIBRARIES})
endif()
if(NOT TARGET Boost::date_time)
add_library(Boost::date_time SHARED IMPORTED)
set_property(TARGET Boost::date_time PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
set_property(TARGET Boost::date_time PROPERTY
INTERFACE_LINK_LIBRARIES ${Boost_DATE_TIME_LIBRARIES})
set_property(TARGET Boost::date_time PROPERTY
IMPORTED_LOCATION ${Boost_DATE_TIME_LIBRARIES})
endif()
if(NOT TARGET Boost::system)
add_library(Boost::system SHARED IMPORTED)
set_property(TARGET Boost::system PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
set_property(TARGET Boost::system PROPERTY
INTERFACE_LINK_LIBRARIES ${Boost_SYSTEM_LIBRARIES})
set_property(TARGET Boost::system PROPERTY
IMPORTED_LOCATION ${Boost_SYSTEM_LIBRARIES})
endif()
if(NOT TARGET Boost::filesystem)
add_library(Boost::filesystem SHARED IMPORTED)
set_property(TARGET Boost::filesystem PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
set_property(TARGET Boost::filesystem PROPERTY
INTERFACE_LINK_LIBRARIES ${Boost_FILESYSTEM_LIBRARIES})
set_property(TARGET Boost::filesystem PROPERTY
IMPORTED_LOCATION ${Boost_FILESYSTEM_LIBRARIES})
endif()
if(NOT TARGET Boost::thread)
add_library(Boost::thread SHARED IMPORTED)
set_property(TARGET Boost::thread PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
set_property(TARGET Boost::thread PROPERTY
INTERFACE_LINK_LIBRARIES ${Boost_THREAD_LIBRARIES})
set_property(TARGET Boost::thread PROPERTY
IMPORTED_LOCATION ${Boost_THREAD_LIBRARIES})
endif()
if(NOT TARGET Boost::serialization)
add_library(Boost::serialization SHARED IMPORTED)
set_property(TARGET Boost::serialization PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
set_property(TARGET Boost::serialization PROPERTY
INTERFACE_LINK_LIBRARIES ${Boost_SERIALIZATION_LIBRARIES})
set_property(TARGET Boost::serialization PROPERTY
IMPORTED_LOCATION ${Boost_SERIALIZATION_LIBRARIES})
endif()
if(NOT TARGET Boost::chrono)
add_library(Boost::chrono SHARED IMPORTED)
set_property(TARGET Boost::chrono PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
set_property(TARGET Boost::chrono PROPERTY
INTERFACE_LINK_LIBRARIES ${Boost_CHRONO_LIBRARIES})
set_property(TARGET Boost::chrono PROPERTY
IMPORTED_LOCATION ${Boost_CHRONO_LIBRARIES})
endif()
endif()
################################################################################
@ -530,22 +594,98 @@ if(NOT GNURADIO_RUNTIME_FOUND)
message(" brew install gnuradio")
message(FATAL_ERROR "GNU Radio ${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr")
endif()
else()
if(NOT TARGET Gnuradio::runtime)
add_library(Gnuradio::runtime SHARED IMPORTED)
list(GET GNURADIO_RUNTIME_LIBRARIES 0 FIRST_DIR)
get_filename_component(GNURADIO_RUNTIME_DIR ${FIRST_DIR} ABSOLUTE)
set_target_properties(Gnuradio::runtime PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GNURADIO_RUNTIME_DIR}"
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_RUNTIME_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${GNURADIO_RUNTIME_LIBRARIES}"
)
endif()
endif()
if(NOT GNURADIO_ANALOG_FOUND)
message(FATAL_ERROR "*** The gnuradio-analog library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr")
else()
if(NOT TARGET Gnuradio::analog)
add_library(Gnuradio::analog SHARED IMPORTED)
list(GET GNURADIO_ANALOG_LIBRARIES 0 FIRST_DIR)
get_filename_component(GNURADIO_ANALOG_DIR ${FIRST_DIR} ABSOLUTE)
set_target_properties(Gnuradio::analog PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GNURADIO_ANALOG_DIR}"
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_ANALOG_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${GNURADIO_ANALOG_LIBRARIES}"
)
endif()
endif()
if(NOT GNURADIO_BLOCKS_FOUND)
message(FATAL_ERROR "*** The gnuradio-blocks library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr")
else()
if(NOT TARGET Gnuradio::blocks)
add_library(Gnuradio::blocks SHARED IMPORTED)
list(GET GNURADIO_BLOCKS_LIBRARIES 0 FIRST_DIR)
get_filename_component(GNURADIO_BLOCKS_DIR ${FIRST_DIR} ABSOLUTE)
set_target_properties(Gnuradio::blocks PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GNURADIO_BLOCKS_DIR}"
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_BLOCKS_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${GNURADIO_BLOCKS_LIBRARIES}"
)
endif()
endif()
if(NOT GNURADIO_FILTER_FOUND)
message(FATAL_ERROR "*** The gnuradio-filter library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr")
else()
if(NOT TARGET Gnuradio::filter)
add_library(Gnuradio::filter SHARED IMPORTED)
list(GET GNURADIO_FILTER_LIBRARIES 0 FIRST_DIR)
get_filename_component(GNURADIO_FILTER_DIR ${FIRST_DIR} ABSOLUTE)
set_target_properties(Gnuradio::filter PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GNURADIO_FILTER_DIR}"
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_FILTER_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${GNURADIO_FILTER_LIBRARIES}"
)
endif()
endif()
if(NOT GNURADIO_FFT_FOUND)
message(FATAL_ERROR "*** The gnuradio-fft library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr")
else()
if(NOT TARGET Gnuradio::fft)
add_library(Gnuradio::fft SHARED IMPORTED)
list(GET GNURADIO_FFT_LIBRARIES 0 FIRST_DIR)
get_filename_component(GNURADIO_FFT_DIR ${FIRST_DIR} ABSOLUTE)
set_target_properties(Gnuradio::fft PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GNURADIO_FFT_DIR}"
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_FFT_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${GNURADIO_FFT_LIBRARIES}"
)
endif()
endif()
if(NOT GNURADIO_PMT_FOUND)
message(FATAL_ERROR "*** The gnuradio-pmt library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr")
else()
if(NOT TARGET Gnuradio::pmt)
add_library(Gnuradio::pmt SHARED IMPORTED)
list(GET GNURADIO_PMT_LIBRARIES 0 FIRST_DIR)
get_filename_component(GNURADIO_PMT_DIR ${FIRST_DIR} ABSOLUTE)
set_target_properties(Gnuradio::pmt PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GNURADIO_PMT_DIR}"
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_PMT_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${GNURADIO_PMT_LIBRARIES}"
)
endif()
endif()
@ -695,6 +835,19 @@ if(NOT VOLKGNSSSDR_FOUND)
set(VOLK_GNSSSDR_INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/build/include/;${CMAKE_CURRENT_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/include;${ORC_INCLUDE_DIRS}")
set(VOLK_GNSSSDR_LIBRARIES volk_gnsssdr ${ORC_LIBRARIES})
if(NOT TARGET Volkgnsssdr::volkgnsssdr)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/build/include)
add_library(Volkgnsssdr::volkgnsssdr STATIC IMPORTED)
add_dependencies(Volkgnsssdr::volkgnsssdr volk_gnsssdr_module)
set_target_properties(Volkgnsssdr::volkgnsssdr PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/lib/libvolk_gnsssdr${CMAKE_STATIC_LIBRARY_SUFFIX}"
INCLUDE_DIRECTORIES "${VOLK_GNSSSDR_INCLUDE_DIRS}"
INTERFACE_INCLUDE_DIRECTORIES "${VOLK_GNSSSDR_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${VOLK_GNSSSDR_LIBRARIES}"
)
endif()
if(CMAKE_VERSION VERSION_LESS 3.2)
add_custom_command(TARGET volk_gnsssdr_module POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr_profile
@ -756,16 +909,23 @@ if(NOT GFLAGS_FOUND)
${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/include CACHE PATH "Local Gflags headers"
)
add_library(gflags UNKNOWN IMPORTED)
set_property(TARGET gflags PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX})
add_dependencies(gflags gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION})
set(GFlags_LIBS gflags)
file(GLOB GFlags_SHARED_LIBS "${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_SHARED_LIBRARY_SUFFIX}*")
set(GFlags_LIBRARY gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION})
set(GFlags_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib)
link_directories(${GFlags_LIBRARY_PATH})
set(GFlags_lib ${GFlags_LIBS} CACHE FILEPATH "Local Gflags library")
set(GFlags_LIBRARY_PATH ${GFlags_LIBS})
file(GLOB GFlags_SHARED_LIBS
"${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_SHARED_LIBRARY_SUFFIX}*"
)
if(NOT TARGET Gflags::gflags)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/include)
add_library(Gflags::gflags STATIC IMPORTED)
add_dependencies(Gflags::gflags gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION})
set_target_properties(Gflags::gflags PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX}"
INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/include"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/include"
INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
endif()
set(LOCAL_GFLAGS true CACHE STRING "GFlags downloaded and built automatically" FORCE)
endif()
@ -899,6 +1059,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c
INSTALL_COMMAND ""
)
endif()
add_dependencies(glog-${GNSSSDR_GLOG_LOCAL_VERSION} Gflags::gflags)
# Set up variables
set(GLOG_INCLUDE_DIRS
@ -908,15 +1069,28 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c
set(GLOG_LIBRARIES
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}
)
# Create Glog::glog target
if(NOT TARGET Glog::glog)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/src)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/src)
add_library(Glog::glog STATIC IMPORTED)
add_dependencies(Glog::glog glog-${GNSSSDR_GLOG_LOCAL_VERSION})
set_target_properties(Glog::glog PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}"
INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}"
INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
endif()
set(LOCAL_GLOG true CACHE STRING "Glog downloaded and built automatically" FORCE)
else()
add_library(glog-${GNSSSDR_GLOG_LOCAL_VERSION} UNKNOWN IMPORTED)
set_property(TARGET glog-${GNSSSDR_GLOG_LOCAL_VERSION} PROPERTY IMPORTED_LOCATION "${GLOG_LIBRARIES}")
endif()
if(NOT ENABLE_LOG)
message(STATUS "Logging is not enabled")
add_definitions(-DGOOGLE_STRIP_LOG=1)
target_compile_definitions(Glog::glog PUBLIC -DGOOGLE_STRIP_LOG=1)
endif()
@ -967,6 +1141,14 @@ if(ARMADILLO_FOUND)
if(${ARMADILLO_VERSION_STRING} VERSION_LESS ${GNSSSDR_ARMADILLO_MIN_VERSION})
set(ARMADILLO_FOUND false)
set(ENABLE_OWN_ARMADILLO true)
else()
add_library(Armadillo::armadillo SHARED IMPORTED)
set_target_properties(Armadillo::armadillo PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${ARMADILLO_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${ARMADILLO_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${ARMADILLO_LIBRARIES}"
)
endif()
endif()
@ -1028,17 +1210,22 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
# Set up variables
ExternalProject_Get_Property(armadillo-${armadillo_RELEASE} binary_dir)
set(ARMADILLO_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include)
#set(ARMADILLO_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include)
if(NOT GFORTRAN)
set(GFORTRAN "")
endif()
set(ARMADILLO_LIBRARIES ${BLAS} ${LAPACK} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX})
set(LOCAL_ARMADILLO true CACHE STRING "Armadillo downloaded and built automatically" FORCE)
set(ARMADILLO_VERSION_STRING ${armadillo_RELEASE})
else()
set(armadillo_RELEASE ${ARMADILLO_VERSION_STRING})
add_library(armadillo-${armadillo_RELEASE} UNKNOWN IMPORTED)
set_property(TARGET armadillo-${armadillo_RELEASE} PROPERTY IMPORTED_LOCATION "${ARMADILLO_LIBRARIES}")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include)
add_library(Armadillo::armadillo STATIC IMPORTED)
add_dependencies(Armadillo::armadillo armadillo-${armadillo_RELEASE})
set_target_properties(Armadillo::armadillo PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include"
INTERFACE_LINK_LIBRARIES "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
endif()
@ -1165,6 +1352,7 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS
set(HDF5_BASE_DIR /usr/local)
endif()
endif()
if(CMAKE_VERSION VERSION_LESS 3.2)
ExternalProject_Add(matio-${GNSSSDR_MATIO_LOCAL_VERSION}
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/matio
@ -1173,7 +1361,7 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}
UPDATE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}/autogen.sh
CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}/configure --with-hdf5=${HDF5_BASE_DIR} --with-zlib=${ZLIB_BASE_DIR} --with-default-file-ver=7.3 --enable-mat73=yes --prefix=<INSTALL_DIR>
BUILD_COMMAND make
BUILD_COMMAND $(MAKE)
)
else()
ExternalProject_Add(matio-${GNSSSDR_MATIO_LOCAL_VERSION}
@ -1183,13 +1371,23 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}
UPDATE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}/autogen.sh
CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}/configure --with-hdf5=${HDF5_BASE_DIR} --with-zlib=${ZLIB_BASE_DIR} --with-default-file-ver=7.3 --enable-mat73=yes --prefix=<INSTALL_DIR>
BUILD_COMMAND make
BUILD_COMMAND $(MAKE)
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/matio/lib/${CMAKE_FIND_LIBRARY_PREFIXES}matio${CMAKE_STATIC_LIBRARY_SUFFIX}
)
endif()
set(MATIO_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/matio/lib/${CMAKE_FIND_LIBRARY_PREFIXES}matio${CMAKE_STATIC_LIBRARY_SUFFIX} ${HDF5_LIBRARIES} ${ZLIB_LIBRARIES})
set(MATIO_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/matio/include)
set(MATIO_LOCAL true)
if(NOT TARGET Matio::matio)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/matio/include)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/matio/lib)
add_library(Matio::matio SHARED IMPORTED)
add_dependencies(Matio::matio matio-${GNSSSDR_MATIO_LOCAL_VERSION})
set_target_properties(Matio::matio PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/matio/lib/${CMAKE_FIND_LIBRARY_PREFIXES}matio${CMAKE_SHARED_LIBRARY_SUFFIX}"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/matio/include"
INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/matio/lib/${CMAKE_FIND_LIBRARY_PREFIXES}matio${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
endif()
else()
message(STATUS " The hdf5 library has not been found in your system.")
message(STATUS " Please try to install it by doing:")
@ -1250,9 +1448,18 @@ else()
INSTALL_COMMAND ""
)
endif()
set(PUGIXML_LIBRARY ${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX})
set(PUGIXML_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pugixml/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/src)
set(PUGIXML_LOCAL true)
if(NOT TARGET Pugixml::pugixml)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pugixml/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/src)
add_library(Pugixml::pugixml STATIC IMPORTED)
add_dependencies(Pugixml::pugixml pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION})
set_target_properties(Pugixml::pugixml PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX}"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pugixml/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/src"
INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
endif()
endif()
@ -1581,7 +1788,7 @@ endif()
if(NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) AND NOT WIN32)
if(NOT (CMAKE_VERSION VERSION_LESS "3.1"))
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 11)
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.
#
@ -26,6 +26,10 @@
# GFlags_INCLUDE_DIRS
# GFlags_LIBS
# GFlags_LIBRARY_DIRS
#
# Provides the following imported target:
# Gflags::gflags
#
if(APPLE)
find_path(GFlags_ROOT_DIR
@ -95,9 +99,6 @@ if(GFlags_ROOT_DIR)
else()
set(GFLAGS_GREATER_20 FALSE)
endif()
# set up include and link directory
include_directories(${GFlags_INCLUDE_DIRS})
link_directories(${GFlags_LIBRARY_DIRS})
message(STATUS "gflags library found at ${GFlags_lib}")
set(GFlags_LIBS ${GFlags_lib})
set(GFlags_FOUND true)
@ -109,3 +110,13 @@ endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GFLAGS DEFAULT_MSG GFlags_LIBS GFlags_INCLUDE_DIRS)
if(GFLAGS_FOUND AND NOT TARGET Gflags::gflags)
add_library(Gflags::gflags SHARED IMPORTED)
set_target_properties(Gflags::gflags PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GFlags_LIBS}"
INTERFACE_INCLUDE_DIRECTORIES "${GFlags_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${GFlags_LIBS}"
)
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.
#
@ -27,6 +27,9 @@
#
# GLOG_ROOT - Can be set to Glog install path or Windows build path
#
# Provides the following imported target:
# Glog::glog
#
if(NOT DEFINED GLOG_ROOT)
set(GLOG_ROOT /usr /usr/local)
@ -135,6 +138,12 @@ else()
string(REGEX REPLACE "/libglog.so" "" GLOG_LIBRARIES_DIR ${GLOG_LIBRARIES})
endif()
if(GLOG_FOUND)
# _GLOG_APPEND_LIBRARIES(GLOG GLOG_LIBRARIES)
if(GLOG_FOUND AND NOT TARGET Glog::glog)
add_library(Glog::glog SHARED IMPORTED)
set_target_properties(Glog::glog PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GLOG_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${GLOG_LIBRARIES}"
)
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.
#
@ -32,18 +32,30 @@ find_path(GPSTK_INCLUDE_DIR gpstk/Rinex3ObsBase.hpp
set(GPSTK_NAMES ${GPSTK_NAMES} gpstk libgpstk)
include(GNUInstallDirs)
find_library(GPSTK_LIBRARY NAMES ${GPSTK_NAMES}
HINTS /usr/lib
/usr/local/lib
/usr/${CMAKE_INSTALL_LIBDIR}
/usr/local/${CMAKE_INSTALL_LIBDIR}
/opt/local/lib
${GPSTK_ROOT}/lib
$ENV{GPSTK_ROOT}/lib
${GPSTK_ROOT}/lib64
$ENV{GPSTK_ROOT}/lib64
${GPSTK_ROOT}/${CMAKE_INSTALL_LIBDIR}
$ENV{GPSTK_ROOT}/${CMAKE_INSTALL_LIBDIR}
)
# handle the QUIETLY and REQUIRED arguments and set GPSTK_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GPSTK DEFAULT_MSG GPSTK_LIBRARY GPSTK_INCLUDE_DIR)
mark_as_advanced(GPSTK_INCLUDE_DIR GPSTK_LIBRARY GPSTK_INCLUDE_DIR)
mark_as_advanced(GPSTK_LIBRARY GPSTK_INCLUDE_DIR)
if(GPSTK_FOUND AND NOT TARGET Gpstk::gpstk)
add_library(Gpstk::gpstk SHARED IMPORTED)
set_target_properties(Gpstk::gpstk PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GPSTK_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${GPSTK_INCLUDE_DIR};${GPSTK_INCLUDE_DIR}/gpstk"
INTERFACE_LINK_LIBRARIES "${GPSTK_LIBRARY}"
)
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.
#
@ -26,6 +26,9 @@
# MATIO_INCLUDE_DIRS - where to find matio.h, etc..
# MATIO_VERSION_STRING - version number as a string (e.g.: "1.3.4")
#
# Provides the following imported target:
# Matio::matio
#
#=============================================================================
# Copyright 2015 Avtech Scientific <http://avtechscientific.com>
#
@ -127,3 +130,13 @@ else()
set(MATIO_LIBRARIES)
set(MATIO_INCLUDE_DIRS)
endif()
if(MATIO_FOUND AND NOT TARGET Matio::matio)
add_library(Matio::matio SHARED IMPORTED)
set_target_properties(Matio::matio PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${MATIO_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${MATIO_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${MATIO_LIBRARY}"
)
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.
#
@ -22,6 +22,10 @@
# PUGIXML_INCLUDE_DIR - header location
# PUGIXML_LIBRARIES - library to link against
# PUGIXML_FOUND - true if pugixml was found.
#
# Provides the following imported target:
# Pugixml::pugixml
#
find_path(PUGIXML_INCLUDE_DIR
NAMES pugixml.hpp
@ -73,3 +77,13 @@ else()
endif()
mark_as_advanced(PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR)
if(PUGIXML_FOUND AND NOT TARGET Pugixml::pugixml)
add_library(Pugixml::pugixml SHARED IMPORTED)
set_target_properties(Pugixml::pugixml PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${PUGIXML_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${PUGIXML_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${PUGIXML_LIBRARY}"
)
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,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:
# Volk::volk
#
########################################################################
# Find VOLK (Vector-Optimized Library of Kernels)
########################################################################
@ -74,3 +79,13 @@ find_library(VOLK_LIBRARIES
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(VOLK DEFAULT_MSG VOLK_LIBRARIES VOLK_INCLUDE_DIRS)
mark_as_advanced(VOLK_LIBRARIES VOLK_INCLUDE_DIRS VOLK_VERSION)
if(VOLK_FOUND AND NOT TARGET Volk::volk)
add_library(Volk::volk SHARED IMPORTED)
set_target_properties(Volk::volk PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${VOLK_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${VOLK_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${VOLK_LIBRARIES}"
)
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:
# Volkgnsssdr::volkgnsssdr
#
########################################################################
# Find VOLK (Vector-Optimized Library of Kernels) GNSS-SDR library
########################################################################
@ -51,3 +57,14 @@ find_library(VOLK_GNSSSDR_LIBRARIES
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(VOLKGNSSSDR DEFAULT_MSG VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
mark_as_advanced(VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
if(GFLAGS_FOUND AND NOT TARGET Volkgnsssdr::volkgnsssdr)
add_library(Volkgnsssdr::volkgnsssdr SHARED IMPORTED)
set_target_properties(Volkgnsssdr::volkgnsssdr PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${VOLK_GNSSSDR_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${VOLK_GNSSSDR_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${VOLK_GNSSSDR_LIBRARIES}"
)
endif()

View File

@ -4,6 +4,10 @@
- Added the BeiDou B1I receiver chain.
### Improvements in Portability:
- CMake scripts now follow a modern approach (targets and properties) but still work in 2.8.12
## [0.0.10](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.10)

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.
#
@ -17,10 +17,6 @@
#
if(Boost_VERSION LESS 105800)
add_definitions(-DOLD_BOOST=1)
endif()
set(PVT_ADAPTER_SOURCES
rtklib_pvt.cc
)
@ -29,28 +25,27 @@ set(PVT_ADAPTER_HEADERS
rtklib_pvt.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
add_library(pvt_adapters ${PVT_ADAPTER_SOURCES} ${PVT_ADAPTER_HEADERS})
source_group(Headers FILES ${PVT_ADAPTER_HEADERS})
target_link_libraries(pvt_adapters
pvt_gr_blocks
${ARMADILLO_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
PUBLIC
pvt_gr_blocks
Armadillo::armadillo
Gnuradio::runtime
gnss_system_parameters
gnss_rx
pvt_lib
PRIVATE
Boost::serialization
)
if(Boost_VERSION LESS 105800)
target_compile_definitions(pvt_adapters PUBLIC -DOLD_BOOST=1)
endif()
set_property(TARGET pvt_adapters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -16,11 +16,6 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
if(Boost_VERSION LESS 105800)
add_definitions(-DOLD_BOOST=1)
endif()
set(PVT_GR_BLOCKS_SOURCES
rtklib_pvt_cc.cc
)
@ -29,21 +24,35 @@ set(PVT_GR_BLOCKS_HEADERS
rtklib_pvt_cc.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
add_library(pvt_gr_blocks ${PVT_GR_BLOCKS_SOURCES} ${PVT_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${PVT_GR_BLOCKS_HEADERS})
target_link_libraries(pvt_gr_blocks
PUBLIC
Boost::date_time
pvt_lib
Gnuradio::runtime
gnss_system_parameters
gnss_rx
PRIVATE
Glog::glog
Boost::filesystem
Boost::system
)
add_library(pvt_gr_blocks ${PVT_GR_BLOCKS_SOURCES} ${PVT_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${PVT_GR_BLOCKS_HEADERS})
target_link_libraries(pvt_gr_blocks pvt_lib ${ARMADILLO_LIBRARIES})
target_include_directories(pvt_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${CMAKE_SOURCE_DIR}/src/core/system_parameters
)
if(Boost_VERSION LESS 105800)
target_compile_definitions(pvt_gr_blocks PUBLIC -DOLD_BOOST=1)
endif()
set_property(TARGET pvt_gr_blocks
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/core/system_parameters>
)

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.
#
@ -16,7 +16,6 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
add_definitions(-DGNSS_SDR_VERSION="${VERSION}")
set(PVT_LIB_SOURCES
pvt_solution.cc
@ -46,48 +45,35 @@ set(PVT_LIB_HEADERS
pvt_conf.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${Boost_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${MATIO_INCLUDE_DIRS}
)
list(SORT PVT_LIB_HEADERS)
list(SORT PVT_LIB_SOURCES)
add_library(pvt_lib ${PVT_LIB_SOURCES} ${PVT_LIB_HEADERS})
source_group(Headers FILES ${PVT_LIB_HEADERS})
if(MATIO_FOUND)
add_dependencies(pvt_lib
glog-${glog_RELEASE}
armadillo-${armadillo_RELEASE}
)
else()
add_dependencies(pvt_lib
glog-${glog_RELEASE}
armadillo-${armadillo_RELEASE}
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
)
endif()
target_link_libraries(pvt_lib
rtklib_lib
gnss_sdr_flags
gnss_sp_libs
${Boost_LIBRARIES}
${GLOG_LIBRARIES}
${ARMADILLO_LIBRARIES}
${BLAS}
${LAPACK}
${MATIO_LIBRARIES}
PUBLIC
Armadillo::armadillo
Boost::date_time
gnss_system_parameters
gnss_sp_libs
rtklib_lib
gnss_rx
PRIVATE
Boost::filesystem
Boost::system
Glog::glog
Matio::matio
)
target_include_directories(pvt_lib PUBLIC ${CMAKE_SOURCE_DIR}/src/algorithms/libs ${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib)
target_compile_definitions(pvt_lib PUBLIC -DGNSS_SDR_VERSION="${VERSION}")
set_property(TARGET pvt_lib APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/algorithms/libs>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/core/system_parameters>
)

View File

@ -38,6 +38,7 @@
#include "rtklib_solver.h"
#include <fstream>
#include <memory>
#include <string>

View File

@ -31,7 +31,6 @@
#include "rinex_printer.h"
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/date_time/local_time/local_time.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/date_time/time_zone_base.hpp>
#include <boost/filesystem/operations.hpp> // for create_directories, exists
#include <boost/filesystem/path.hpp> // for path, operator<<

View File

@ -36,8 +36,8 @@
#include "rtcm.h"
#include <fstream> // std::ofstream
#include <memory> // std::shared_ptr
#include <map>
#include <memory> // std::shared_ptr
/*!
* \brief This class provides a implementation of a subset of the RTCM Standard 10403.2 messages

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.
#
@ -83,33 +83,29 @@ if(OPENCL_FOUND)
)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${GNURADIO_BLOCKS_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
list(SORT ACQ_ADAPTER_HEADERS)
list(SORT ACQ_ADAPTER_SOURCES)
add_library(acq_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS})
source_group(Headers FILES ${ACQ_ADAPTER_HEADERS})
target_link_libraries(acq_adapters
acquisition_lib
gnss_sp_libs
gnss_sdr_flags
acq_gr_blocks
${Boost_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
PUBLIC
gnss_sp_libs
gnss_sdr_flags
acq_gr_blocks
rx_core_lib
Gnuradio::blocks
gnss_system_parameters
PRIVATE
Boost::boost
Glog::glog
Volkgnsssdr::volkgnsssdr
acquisition_lib
)
set_property(TARGET acq_adapters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

View File

@ -34,7 +34,6 @@
#ifndef GNSS_SDR_BEIDOU_B1I_PCPS_ACQUISITION_H_
#define GNSS_SDR_BEIDOU_B1I_PCPS_ACQUISITION_H_
#include "acq_conf.h"
#include "acquisition_interface.h"
#include "complex_byte_to_float_x2.h"
#include "gnss_synchro.h"

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.
#
@ -49,21 +49,6 @@ if(OPENCL_FOUND)
set(ACQ_GR_BLOCKS_HEADERS ${ACQ_GR_BLOCKS_HEADERS} pcps_opencl_acquisition_cc.h)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${MATIO_INCLUDE_DIRS}
)
if(OPENCL_FOUND)
include_directories(${OPENCL_INCLUDE_DIRS})
@ -79,32 +64,30 @@ list(SORT ACQ_GR_BLOCKS_SOURCES)
add_library(acq_gr_blocks ${ACQ_GR_BLOCKS_SOURCES} ${ACQ_GR_BLOCKS_HEADERS})
source_group(Headers FILES ${ACQ_GR_BLOCKS_HEADERS})
if(ENABLE_FPGA)
target_link_libraries(acq_gr_blocks
target_link_libraries(acq_gr_blocks
PUBLIC
Gnuradio::runtime
Gnuradio::fft
Volk::volk
gnss_system_parameters
acquisition_lib
gnss_sp_libs
gnss_system_parameters
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${VOLK_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${OPT_LIBRARIES}
${OPT_ACQUISITION_LIBRARIES}
)
else()
target_link_libraries(acq_gr_blocks
PRIVATE
gnss_sp_libs
gnss_system_parameters
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${VOLK_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${OPT_LIBRARIES}
${MATIO_LIBRARIES}
${OPT_ACQUISITION_LIBRARIES}
)
Glog::glog
Boost::filesystem
Matio::matio
Volkgnsssdr::volkgnsssdr
gnss_rx
)
if(OPENCL_FOUND)
target_include_directories(acq_gr_blocks PUBLIC ${OPENCL_INCLUDE_DIRS})
endif()
if(NOT VOLKGNSSSDR_FOUND)
add_dependencies(acq_gr_blocks volk_gnsssdr_module)
endif()
target_include_directories(acq_gr_blocks PUBLIC ${CMAKE_SOURCE_DIR}/src/algorithms/libs)
set_property(TARGET acq_gr_blocks
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -19,17 +19,6 @@
if(ENABLE_FPGA)
set(ACQUISITION_LIB_SOURCES fpga_acquisition.cc)
set(ACQUISITION_LIB_HEADERS fpga_acquisition.h)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${VOLK_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
endif()
set(ACQUISITION_LIB_HEADERS ${ACQUISITION_LIB_HEADERS} acq_conf.h)
@ -46,13 +35,17 @@ add_library(acquisition_lib
source_group(Headers FILES ${ACQUISITION_LIB_HEADERS})
target_link_libraries(acquisition_lib
${VOLK_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
PUBLIC
Volk::volk
Gnuradio::fft
PRIVATE
Glog::glog
gnss_system_parameters
gnss_rx
gnss_sp_libs
)
if(VOLKGNSSSDR_FOUND)
add_dependencies(acquisition_lib glog-${glog_RELEASE})
else()
add_dependencies(acquisition_lib glog-${glog_RELEASE} volk_gnsssdr_module)
endif()
set_property(TARGET acquisition_lib
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -19,19 +19,6 @@
set(CHANNEL_ADAPTER_SOURCES channel.cc)
set(CHANNEL_ADAPTER_HEADERS channel.h)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/channel/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
add_library(channel_adapters
${CHANNEL_ADAPTER_SOURCES}
${CHANNEL_ADAPTER_HEADERS}
@ -40,8 +27,16 @@ add_library(channel_adapters
source_group(Headers FILES ${CHANNEL_ADAPTER_HEADERS})
target_link_libraries(channel_adapters
channel_fsm
${GNURADIO_RUNTIME_LIBRARIES}
${Boost_LIBRARIES}
gnss_sdr_flags
PUBLIC
Gnuradio::runtime
channel_fsm
gnss_rx
PRIVATE
gnss_sdr_flags
Glog::glog
)
set_property(TARGET channel_adapters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -26,23 +26,21 @@ set(CHANNEL_FSM_HEADERS
channel_msg_receiver_cc.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/channel/adapters
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
list(SORT CHANNEL_FSM_HEADERS)
list(SORT CHANNEL_FSM_SOURCES)
add_library(channel_fsm ${CHANNEL_FSM_SOURCES} ${CHANNEL_FSM_HEADERS})
source_group(Headers FILES ${CHANNEL_FSM_HEADERS})
add_dependencies(channel_fsm glog-${glog_RELEASE})
target_link_libraries(channel_fsm gnss_rx)
target_link_libraries(channel_fsm
PUBLIC
gnss_rx
Gnuradio::runtime
PRIVATE
Glog::glog
)
set_property(TARGET channel_fsm
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -27,21 +27,21 @@ set(COND_ADAPTER_HEADERS
array_signal_conditioner.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
list(SORT COND_ADAPTER_HEADERS)
list(SORT COND_ADAPTER_SOURCES)
add_library(conditioner_adapters ${COND_ADAPTER_SOURCES} ${COND_ADAPTER_HEADERS})
source_group(Headers FILES ${COND_ADAPTER_HEADERS})
add_dependencies(conditioner_adapters glog-${glog_RELEASE})
target_link_libraries(conditioner_adapters
PUBLIC
gnss_rx
Gnuradio::runtime
PRIVATE
Glog::glog
)
set_property(TARGET conditioner_adapters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -35,18 +35,6 @@ set(DATATYPE_ADAPTER_HEADERS
ishort_to_complex.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/data_type_adapter/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
list(SORT DATATYPE_ADAPTER_HEADERS)
list(SORT DATATYPE_ADAPTER_SOURCES)
@ -56,9 +44,25 @@ add_library(datatype_adapters
)
source_group(Headers FILES ${DATATYPE_ADAPTER_HEADERS})
add_dependencies(datatype_adapters glog-${glog_RELEASE})
target_link_libraries(datatype_adapters
data_type_gr_blocks
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
PUBLIC
gnss_system_parameters
gnss_rx
data_type_gr_blocks
gnss_sp_libs
Gnuradio::blocks
PRIVATE
Glog::glog
Volk::volk
)
target_include_directories(datatype_adapters
PUBLIC
${CMAKE_SOURCE_DIR}/src/algorithms/libs
)
set_property(TARGET datatype_adapters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -29,12 +29,6 @@ set(DATA_TYPE_GR_BLOCKS_HEADERS
interleaved_byte_to_complex_short.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
list(SORT DATA_TYPE_GR_BLOCKS_HEADERS)
list(SORT DATA_TYPE_GR_BLOCKS_SOURCES)
@ -46,6 +40,15 @@ add_library(data_type_gr_blocks
source_group(Headers FILES ${DATA_TYPE_GR_BLOCKS_HEADERS})
target_link_libraries(data_type_gr_blocks
${GNURADIO_RUNTIME_LIBRARIES}
${VOLK_LIBRARIES}
PUBLIC
Gnuradio::runtime
Boost::boost
gnss_sp_libs
PRIVATE
Volk::volk
)
set_property(TARGET data_type_gr_blocks
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -34,22 +34,6 @@ set(INPUT_FILTER_ADAPTER_HEADERS
notch_filter_lite.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/input_filter/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
add_definitions(-DGR_GREATER_38=1)
endif()
list(SORT INPUT_FILTER_ADAPTER_HEADERS)
list(SORT INPUT_FILTER_ADAPTER_SOURCES)
@ -59,11 +43,26 @@ add_library(input_filter_adapters
)
source_group(Headers FILES ${INPUT_FILTER_ADAPTER_HEADERS})
add_dependencies(input_filter_adapters glog-${glog_RELEASE} gnss_sp_libs)
target_link_libraries(input_filter_adapters
input_filter_gr_blocks
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
gnss_sp_libs
PUBLIC
input_filter_gr_blocks
Gnuradio::filter
Gnuradio::blocks
gnss_sp_libs
gnss_rx
PRIVATE
Volk::volk
)
target_include_directories(input_filter_adapters PUBLIC ${CMAKE_SOURCE_DIR}/src/algorithms/libs)
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
target_compile_definitions(input_filter_adapters PUBLIC -DGR_GREATER_38=1)
endif()
set_property(TARGET input_filter_adapters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -31,15 +31,6 @@ set(INPUT_FILTER_GR_BLOCKS_HEADERS
notch_lite_cc.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${GNURADIO_BLOCKS_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
)
list(SORT INPUT_FILTER_GR_BLOCKS_HEADERS)
list(SORT INPUT_FILTER_GR_BLOCKS_SOURCES)
@ -50,12 +41,17 @@ add_library(input_filter_gr_blocks
source_group(Headers FILES ${INPUT_FILTER_GR_BLOCKS_HEADERS})
target_link_libraries(input_filter_gr_blocks
${GNURADIO_FILTER_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${LOG4CPP_LIBRARIES})
PUBLIC
Gnuradio::filter
Gnuradio::blocks
Volkgnsssdr::volkgnsssdr
PRIVATE
Gflags::gflags
Glog::glog
${LOG4CPP_LIBRARIES}
)
if(NOT VOLKGNSSSDR_FOUND)
add_dependencies(input_filter_gr_blocks volk_gnsssdr_module glog-${glog_RELEASE})
else()
add_dependencies(input_filter_gr_blocks glog-${glog_RELEASE})
endif()
set_property(TARGET input_filter_gr_blocks
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -90,20 +90,6 @@ if(OPENCL_FOUND)
)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/core/interfaces
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${GNURADIO_BLOCKS_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
if(OPENCL_FOUND)
include_directories(${OPENCL_INCLUDE_DIRS})
@ -114,8 +100,6 @@ if(OPENCL_FOUND)
endif()
endif()
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
list(SORT GNSS_SPLIBS_HEADERS)
list(SORT GNSS_SPLIBS_SOURCES)
@ -123,29 +107,50 @@ add_library(gnss_sp_libs ${GNSS_SPLIBS_SOURCES} ${GNSS_SPLIBS_HEADERS})
source_group(Headers FILES ${GNSS_SPLIBS_HEADERS})
target_link_libraries(gnss_sp_libs
${GNURADIO_RUNTIME_LIBRARIES}
${VOLK_LIBRARIES} ${ORC_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES}
${GFlags_LIBS}
${ARMADILLO_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${OPT_LIBRARIES}
gnss_rx
PUBLIC
Boost::boost
Gflags::gflags
Armadillo::armadillo
Gnuradio::runtime
Gnuradio::blocks
Volk::volk ${ORC_LIBRARIES}
Volkgnsssdr::volkgnsssdr
gnss_system_parameters
${OPT_LIBRARIES}
PRIVATE
Boost::filesystem
Glog::glog
gnss_rx
)
if(NOT VOLKGNSSSDR_FOUND)
add_dependencies(gnss_sp_libs volk_gnsssdr_module
armadillo-${armadillo_RELEASE})
else()
add_dependencies(gnss_sp_libs armadillo-${armadillo_RELEASE})
endif()
target_compile_definitions(gnss_sp_libs PUBLIC -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
if(${GFLAGS_GREATER_20})
add_definitions(-DGFLAGS_GREATER_2_0=1)
target_compile_definitions(gnss_sp_libs PUBLIC -DGFLAGS_GREATER_2_0=1)
endif()
set_property(TARGET gnss_sp_libs
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
add_library(gnss_sdr_flags gnss_sdr_flags.cc gnss_sdr_flags.h)
source_group(Headers FILES gnss_sdr_flags.h)
target_link_libraries(gnss_sdr_flags ${GFlags_LIBS})
target_link_libraries(gnss_sdr_flags
PUBLIC
Gflags::gflags
PRIVATE
Boost::filesystem
)
if(${GFLAGS_GREATER_20})
target_compile_definitions(gnss_sdr_flags PUBLIC -DGFLAGS_GREATER_2_0=1)
endif()
target_compile_definitions(gnss_sdr_flags PUBLIC -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
set_property(TARGET gnss_sdr_flags
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

View File

@ -16,7 +16,6 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
#
add_definitions(-DGNSS_SDR_VERSION="${VERSION}")
set(RTKLIB_LIB_SOURCES
rtklib_rtkcmn.cc
@ -59,33 +58,31 @@ set(RTKLIB_LIB_HEADERS
rtklib.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${Boost_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
)
list(SORT RTKLIB_LIB_HEADERS)
list(SORT RTKLIB_LIB_SOURCES)
add_library(rtklib_lib ${RTKLIB_LIB_SOURCES} ${RTKLIB_LIB_HEADERS})
source_group(Headers FILES ${RTKLIB_LIB_HEADERS})
add_dependencies(rtklib_lib glog-${glog_RELEASE})
if(OS_IS_MACOSX)
set(MAC_LIBRARIES "-framework Accelerate")
endif()
target_link_libraries(
rtklib_lib
${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${BLAS}
${LAPACK}
${MAC_LIBRARIES}
target_link_libraries(rtklib_lib
PUBLIC
gnss_rx
gnss_system_parameters
PRIVATE
Gflags::gflags
Glog::glog
${BLAS}
${LAPACK}
${MAC_LIBRARIES}
)
target_compile_definitions(rtklib_lib PUBLIC -DGNSS_SDR_VERSION="${VERSION}")
set_property(TARGET rtklib_lib
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

View File

@ -59,6 +59,7 @@
#include "rtklib_ionex.h"
#include "rtklib_rtkcmn.h"
#include <cstring>
/* get index -----------------------------------------------------------------*/
int getindex(double value, const double *range)

View File

@ -52,6 +52,7 @@
#include "rtklib_lambda.h"
#include "rtklib_rtkcmn.h"
#include <cstring>
/* LD factorization (Q=L'*diag(D)*L) -----------------------------------------*/
int LD(int n, const double *Q, double *L, double *D)

View File

@ -54,6 +54,7 @@
#include "rtklib_ephemeris.h"
#include "rtklib_ionex.h"
#include "rtklib_sbas.h"
#include <cstring>
/* pseudorange measurement error variance ------------------------------------*/
double varerr(const prcopt_t *opt, double el, int sys)

View File

@ -57,6 +57,7 @@
#include "rtklib_rtkcmn.h"
#include "rtklib_sbas.h"
#include "rtklib_tides.h"
#include <cstring>
/* wave length of LC (m) -----------------------------------------------------*/
double lam_LC(int i, int j, int k)

View File

@ -62,6 +62,7 @@
#include "rtklib_preceph.h"
#include "rtklib_rtkcmn.h"
#include <cstring>
/* satellite code to satellite system ----------------------------------------*/
int code2sys(char code)

View File

@ -54,6 +54,7 @@
#include "rtklib_rtcm3.h"
#include "rtklib_rtkcmn.h"
#include <cstring>
/* msm signal id table -------------------------------------------------------*/

View File

@ -52,6 +52,7 @@
#include "rtklib_rtkcmn.h"
//#include <cstdio>
#include <glog/logging.h>
#include <dirent.h>
#include <iostream>
#include <sstream>

View File

@ -79,7 +79,7 @@
#define GNSS_SDR_RTKLIB_RTKCMN_H_
#include "rtklib.h"
#include <glog/logging.h>
//#include <glog/logging.h>
/* coordinate rotation matrix ------------------------------------------------*/
#define Rx(t, X) \

View File

@ -57,6 +57,7 @@
#include "rtklib_pntpos.h"
#include "rtklib_ppp.h"
#include "rtklib_tides.h"
#include <cstring>
static int resamb_WLNL(rtk_t *rtk __attribute((unused)), const obsd_t *obs __attribute((unused)), const int *sat __attribute((unused)),
const int *iu __attribute((unused)), const int *ir __attribute((unused)), int ns __attribute__((unused)), const nav_t *nav __attribute((unused)),

View File

@ -7,6 +7,7 @@
#include "rtklib_sbas.h"
#include "rtklib_solution.h"
#include "rtklib_stream.h"
#include <cstring>
/* write solution header to output stream ------------------------------------*/
void writesolhead(stream_t *stream, const solopt_t *solopt)

View File

@ -61,6 +61,7 @@
#include "rtklib_sbas.h"
#include "rtklib_rtkcmn.h"
#include <cstring>
/* extract field from line ---------------------------------------------------*/
char *getfield(char *p, int pos)

View File

@ -55,6 +55,7 @@
#include "rtklib_rtkcmn.h"
#include "rtklib_rtksvr.h"
#include <cctype>
#include <cstring>
/* constants and macros ------------------------------------------------------*/

View File

@ -53,6 +53,7 @@
#include <arpa/inet.h>
#include <cctype>
#include <cerrno>
#include <cstring>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/tcp.h>

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.
#
@ -24,19 +24,22 @@ set(OBS_ADAPTER_HEADERS
hybrid_observables.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/observables/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
add_library(obs_adapters ${OBS_ADAPTER_SOURCES} ${OBS_ADAPTER_HEADERS})
source_group(Headers FILES ${OBS_ADAPTER_HEADERS})
target_include_directories(obs_adapters PUBLIC ${CMAKE_SOURCE_DIR}/src/algorithms/libs)
target_link_libraries(obs_adapters
PUBLIC
obs_gr_blocks
gnss_rx
gnss_sp_libs
PRIVATE
Glog::glog
)
add_library(obs_adapters ${OBS_ADAPTER_SOURCES} ${OBS_ADAPTER_HEADERS})
source_group(Headers FILES ${OBS_ADAPTER_HEADERS})
target_link_libraries(obs_adapters obs_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES})
set_property(TARGET obs_adapters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -24,42 +24,24 @@ set(OBS_GR_BLOCKS_HEADERS
hybrid_observables_cc.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${MATIO_INCLUDE_DIRS}
)
add_library(obs_gr_blocks ${OBS_GR_BLOCKS_SOURCES} ${OBS_GR_BLOCKS_HEADERS})
target_include_directories(obs_gr_blocks PUBLIC ${CMAKE_SOURCE_DIR}/src/algorithms/libs)
source_group(Headers FILES ${OBS_GR_BLOCKS_HEADERS})
if(MATIO_FOUND)
add_dependencies(obs_gr_blocks
gnss_sp_libs
glog-${glog_RELEASE}
armadillo-${armadillo_RELEASE}
)
else()
add_dependencies(obs_gr_blocks
gnss_sp_libs
glog-${glog_RELEASE}
armadillo-${armadillo_RELEASE}
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
)
endif()
target_link_libraries(obs_gr_blocks
gnss_sp_libs
${GNURADIO_RUNTIME_LIBRARIES}
${ARMADILLO_LIBRARIES}
${MATIO_LIBRARIES}
PUBLIC
Gnuradio::blocks
Boost::boost
gnss_system_parameters
PRIVATE
gnss_sp_libs
Glog::glog
Boost::filesystem
Matio::matio
)
set_property(TARGET obs_gr_blocks APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -27,20 +27,6 @@ set(RESAMPLER_ADAPTER_HEADERS
mmse_resampler_conditioner.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/resampler/gnuradio_blocks
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
add_definitions(-DGR_GREATER_38=1)
endif()
list(SORT RESAMPLER_ADAPTER_HEADERS)
list(SORT RESAMPLER_ADAPTER_SOURCES)
@ -51,4 +37,21 @@ add_library(resampler_adapters
source_group(Headers FILES ${RESAMPLER_ADAPTER_HEADERS})
target_link_libraries(resampler_adapters resampler_gr_blocks)
target_link_libraries(resampler_adapters
PUBLIC
Gnuradio::runtime
resampler_gr_blocks
gnss_rx
PRIVATE
Glog::glog
Volk::volk
)
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
target_compile_definitions(resampler_adapters PUBLIC -DGR_GREATER_38=1)
endif()
set_property(TARGET resampler_adapters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -29,22 +29,26 @@ set(RESAMPLER_GR_BLOCKS_HEADERS
direct_resampler_conditioner_cb.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)
list(SORT RESAMPLER_GR_BLOCKS_HEADERS)
list(SORT RESAMPLER_GR_BLOCKS_SOURCES)
source_group(Headers FILES ${RESAMPLER_GR_BLOCKS_HEADERS})
add_library(resampler_gr_blocks
${RESAMPLER_GR_BLOCKS_SOURCES}
${RESAMPLER_GR_BLOCKS_HEADERS}
)
source_group(Headers FILES ${RESAMPLER_GR_BLOCKS_HEADERS})
target_link_libraries(resampler_gr_blocks
PUBLIC
Gnuradio::runtime
Volk::volk
PRIVATE
Gflags::gflags
Glog::glog
)
add_dependencies(resampler_gr_blocks glog-${glog_RELEASE})
set_property(TARGET resampler_gr_blocks
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -19,18 +19,6 @@
set(SIGNAL_GENERATOR_ADAPTER_SOURCES signal_generator.cc)
set(SIGNAL_GENERATOR_ADAPTER_HEADERS signal_generator.h)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/signal_generator/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
add_library(signal_generator_adapters
${SIGNAL_GENERATOR_ADAPTER_SOURCES}
${SIGNAL_GENERATOR_ADAPTER_HEADERS}
@ -39,9 +27,17 @@ add_library(signal_generator_adapters
source_group(Headers FILES ${SIGNAL_GENERATOR_ADAPTER_HEADERS})
target_link_libraries(signal_generator_adapters
gnss_sp_libs
signal_generator_blocks
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
PUBLIC
signal_generator_blocks
Gnuradio::runtime
Gnuradio::blocks
gnss_rx
PRIVATE
Glog::glog
gnss_sp_libs
)
set_property(TARGET signal_generator_adapters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

View File

@ -20,13 +20,13 @@ set(SIGNAL_GENERATOR_BLOCK_SOURCES signal_generator_c.cc)
set(SIGNAL_GENERATOR_BLOCK_HEADERS signal_generator_c.h)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
#${CMAKE_CURRENT_SOURCE_DIR}
#${CMAKE_SOURCE_DIR}/src/core/system_parameters
#${CMAKE_SOURCE_DIR}/src/core/interfaces
#${CMAKE_SOURCE_DIR}/src/core/receiver
#${CMAKE_SOURCE_DIR}/src/algorithms/libs
#${GLOG_INCLUDE_DIRS}
#${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
@ -39,16 +39,25 @@ add_library(signal_generator_blocks
source_group(Headers FILES ${SIGNAL_GENERATOR_BLOCK_HEADERS})
target_link_libraries(signal_generator_blocks
gnss_system_parameters
gnss_sp_libs
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${ORC_LIBRARIES}
PUBLIC
Boost::boost
gnss_system_parameters
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${ORC_LIBRARIES}
PRIVATE
gnss_sp_libs
)
if(VOLKGNSSSDR_FOUND)
# add_dependencies(signal_generator_blocks glog-${glog_RELEASE})
else()
target_include_directories(signal_generator_blocks PUBLIC ${CMAKE_SOURCE_DIR}/src/algorithms/libs)
set_property(TARGET signal_generator_blocks
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
if(NOT VOLKGNSSSDR_FOUND)
add_dependencies(signal_generator_blocks volk_gnsssdr_module)
endif()

View File

@ -207,21 +207,6 @@ if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
two_bit_packed_file_signal_source.h)
endif()
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}
)
if(ARCH_64BITS)
add_definitions(-DARCH_64BITS=1)
endif()
@ -233,10 +218,27 @@ 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
target_include_directories(signal_source_adapters PUBLIC ${CMAKE_SOURCE_DIR}/src/algorithms/libs)
target_link_libraries(signal_source_adapters
PUBLIC
Boost::boost
Gnuradio::runtime
signal_source_gr_blocks
${Boost_LIBRARIES}
${GNURADIO_PMT_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${OPT_LIBRARIES}
gnss_sp_libs
gnss_rx
signal_source_lib
PRIVATE
Glog::glog
Volk::volk
)
set_property(TARGET signal_source_adapters APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${OPT_DRIVER_INCLUDE_DIRS}>
)

View File

@ -57,12 +57,12 @@ set(SIGNAL_SOURCE_GR_BLOCKS_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}
#${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}
)
@ -77,10 +77,18 @@ add_library(signal_source_gr_blocks
source_group(Headers FILES ${SIGNAL_SOURCE_GR_BLOCKS_HEADERS})
target_link_libraries(signal_source_gr_blocks
signal_source_lib
${GNURADIO_RUNTIME_LIBRARIES}
${Boost_LIBRARIES}
${OPT_LIBRARIES}
PUBLIC
signal_source_lib
Gnuradio::runtime
Boost::thread
${OPT_LIBRARIES}
PRIVATE
Glog::glog
)
add_dependencies(signal_source_gr_blocks glog-${glog_RELEASE})
target_include_directories(signal_source_gr_blocks PUBLIC ${OPT_DRIVER_INCLUDE_DIRS})
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

@ -39,7 +39,7 @@
*
* Value_0, Value_1, Value_2, ..., Value_n, Value_n+1, Value_n+2, ...
*
* \author Cillian O'Driscoll cillian.odriscoll (at) gmail . com
* \author Cillian O'Driscoll cillian.odriscoll (at) gmail . com
* -------------------------------------------------------------------------
*
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)

View File

@ -57,14 +57,6 @@ if(ENABLE_FPGA OR ENABLE_AD9361)
set(OPT_SIGNAL_SOURCE_LIB_HEADERS ${OPT_SIGNAL_SOURCE_LIB_HEADERS} fpga_switch.h)
endif()
include_directories(
${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
@ -81,6 +73,20 @@ list(SORT SIGNAL_SOURCE_LIB_HEADERS)
list(SORT SIGNAL_SOURCE_LIB_SOURCES)
add_library(signal_source_lib ${SIGNAL_SOURCE_LIB_SOURCES} ${SIGNAL_SOURCE_LIB_HEADERS})
source_group(Headers FILES ${SIGNAL_SOURCE_LIB_HEADERS})
target_link_libraries(signal_source_lib ${OPT_LIBRARIES})
add_dependencies(signal_source_lib glog-${glog_RELEASE})
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})
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

@ -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.
#
@ -41,20 +41,6 @@ set(TELEMETRY_DECODER_ADAPTER_HEADERS
beidou_b1i_telemetry_decoder.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs/libswiftcnav
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
list(SORT TELEMETRY_DECODER_ADAPTER_HEADERS)
list(SORT TELEMETRY_DECODER_ADAPTER_SOURCES)
@ -66,7 +52,17 @@ add_library(telemetry_decoder_adapters
source_group(Headers FILES ${TELEMETRY_DECODER_ADAPTER_HEADERS})
target_link_libraries(telemetry_decoder_adapters
telemetry_decoder_gr_blocks
gnss_system_parameters
${GNURADIO_RUNTIME_LIBRARIES}
PUBLIC
telemetry_decoder_gr_blocks
gnss_system_parameters
gnss_rx
PRIVATE
Gnuradio::runtime
telemetry_decoder_lib
)
set_property(TARGET telemetry_decoder_adapters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -38,19 +38,6 @@ set(TELEMETRY_DECODER_GR_BLOCKS_HEADERS
beidou_b1i_telemetry_decoder_cc.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs/libswiftcnav
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
list(SORT TELEMETRY_DECODER_GR_BLOCKS_HEADERS)
list(SORT TELEMETRY_DECODER_GR_BLOCKS_SOURCES)
@ -62,13 +49,19 @@ add_library(telemetry_decoder_gr_blocks
source_group(Headers FILES ${TELEMETRY_DECODER_GR_BLOCKS_HEADERS})
target_link_libraries(telemetry_decoder_gr_blocks
telemetry_decoder_libswiftcnav
telemetry_decoder_lib
gnss_system_parameters
${GNURADIO_RUNTIME_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
PUBLIC
telemetry_decoder_libswiftcnav
telemetry_decoder_lib
gnss_system_parameters
gnss_rx
Gnuradio::runtime
Volkgnsssdr::volkgnsssdr
PRIVATE
Boost::boost
Glog::glog
)
if(NOT VOLKGNSSSDR_FOUND)
add_dependencies(telemetry_decoder_gr_blocks volk_gnsssdr_module)
endif()
set_property(TARGET telemetry_decoder_gr_blocks
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -28,17 +28,6 @@ set(TELEMETRY_DECODER_LIB_HEADERS
convolutional.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/adapters
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
)
list(SORT TELEMETRY_DECODER_LIB_HEADERS)
list(SORT TELEMETRY_DECODER_LIB_SOURCES)
@ -46,6 +35,16 @@ add_library(telemetry_decoder_lib
${TELEMETRY_DECODER_LIB_SOURCES}
${TELEMETRY_DECODER_LIB_HEADERS}
)
source_group(Headers FILES ${TELEMETRY_DECODER_LIB_HEADERS})
target_link_libraries(telemetry_decoder_lib gnss_system_parameters)
target_link_libraries(telemetry_decoder_lib
PUBLIC
gnss_system_parameters
gnss_rx
)
set_property(TARGET telemetry_decoder_lib
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -31,10 +31,6 @@ set(TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS
fec.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)
list(SORT TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS)
list(SORT TELEMETRY_DECODER_LIBSWIFTCNAV_SOURCES)
@ -43,6 +39,11 @@ add_library(telemetry_decoder_libswiftcnav STATIC
${TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS}
)
set_property(TARGET telemetry_decoder_libswiftcnav
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
source_group(Headers FILES ${TELEMETRY_DECODER_LIBSWIFTCNAV_HEADERS})
set_target_properties(telemetry_decoder_libswiftcnav

View File

@ -88,16 +88,16 @@ set(TRACKING_ADAPTER_HEADERS
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
#${CMAKE_CURRENT_SOURCE_DIR}
#${CMAKE_SOURCE_DIR}/src/core/system_parameters
#${CMAKE_SOURCE_DIR}/src/core/interfaces
#${CMAKE_SOURCE_DIR}/src/core/receiver
#${CMAKE_SOURCE_DIR}/src/algorithms/tracking/gnuradio_blocks
#${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs
#${CMAKE_SOURCE_DIR}/src/algorithms/libs
#${ARMADILLO_INCLUDE_DIRS}
#${GLOG_INCLUDE_DIRS}
#${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${OPT_TRACKING_INCLUDE_DIRS}
@ -114,7 +114,13 @@ add_library(tracking_adapters
source_group(Headers FILES ${TRACKING_ADAPTER_HEADERS})
target_link_libraries(tracking_adapters
tracking_gr_blocks
gnss_sp_libs
gnss_sdr_flags
PUBLIC
tracking_gr_blocks
gnss_sp_libs
gnss_sdr_flags
)
set_property(TARGET tracking_adapters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -79,26 +79,9 @@ set(TRACKING_GR_BLOCKS_HEADERS
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${OPT_TRACKING_INCLUDES}
${MATIO_INCLUDE_DIRS}
)
if(ENABLE_GENERIC_ARCH)
add_definitions(-DGENERIC_ARCH=1)
endif()
list(SORT TRACKING_GR_BLOCKS_HEADERS)
list(SORT TRACKING_GR_BLOCKS_SOURCES)
@ -110,27 +93,23 @@ add_library(tracking_gr_blocks
source_group(Headers FILES ${TRACKING_GR_BLOCKS_HEADERS})
target_link_libraries(tracking_gr_blocks
tracking_lib
${GNURADIO_RUNTIME_LIBRARIES}
gnss_sdr_flags gnss_sp_libs
${Boost_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${MATIO_LIBRARIES}
${OPT_TRACKING_LIBRARIES}
PUBLIC
Boost::boost
tracking_lib
Gnuradio::blocks
Volkgnsssdr::volkgnsssdr
gnss_sdr_flags
gnss_sp_libs
gnss_rx
Matio::matio
${OPT_TRACKING_LIBRARIES}
)
if(NOT VOLKGNSSSDR_FOUND)
if(MATIO_FOUND)
add_dependencies(tracking_gr_blocks volk_gnsssdr_module)
else()
add_dependencies(tracking_gr_blocks volk_gnsssdr_module
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
)
endif()
else()
if(NOT MATIO_FOUND)
add_dependencies(tracking_gr_blocks
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
)
endif()
if(ENABLE_GENERIC_ARCH)
target_compile_definitions(tracking_gr_blocks PUBLIC -DGENERIC_ARCH=1)
endif()
set_property(TARGET tracking_gr_blocks
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

View File

@ -67,17 +67,7 @@ if(ENABLE_FPGA)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${ARMADILLO_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${OPT_TRACKING_INCLUDES}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
if(ENABLE_GENERIC_ARCH)
@ -96,15 +86,19 @@ add_library(tracking_lib ${TRACKING_LIB_SOURCES} ${TRACKING_LIB_HEADERS})
source_group(Headers FILES ${TRACKING_LIB_HEADERS})
target_link_libraries(tracking_lib
${OPT_TRACKING_LIBRARIES}
${VOLK_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${Boost_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
PUBLIC
Armadillo::armadillo
Boost::boost
Gnuradio::runtime
Volkgnsssdr::volkgnsssdr
gnss_system_parameters
${OPT_TRACKING_LIBRARIES}
PRIVATE
Gflags::gflags
Glog::glog
)
if(VOLKGNSSSDR_FOUND)
add_dependencies(tracking_lib glog-${glog_RELEASE})
else()
add_dependencies(tracking_lib glog-${glog_RELEASE} volk_gnsssdr_module)
endif()
set_property(TARGET tracking_lib
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -18,10 +18,6 @@
add_subdirectory(supl)
if(OPENSSL_FOUND)
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
endif()
set(CORE_LIBS_SOURCES
ini.cc
INIReader.cc
@ -36,25 +32,27 @@ set(CORE_LIBS_HEADERS
gnss_sdr_supl_client.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/libs/supl
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PUGIXML_INCLUDE_DIR}
)
list(SORT CORE_LIBS_HEADERS)
list(SORT CORE_LIBS_SOURCES)
add_library(rx_core_lib ${CORE_LIBS_SOURCES} ${CORE_LIBS_HEADERS})
source_group(Headers FILES ${CORE_LIBS_HEADERS})
target_link_libraries(rx_core_lib supl_library ${PUGIXML_LIBRARY})
if(PUGIXML_LOCAL)
add_dependencies(rx_core_lib pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION})
endif()
source_group(Headers FILES ${CORE_LIBS_HEADERS})
target_link_libraries(rx_core_lib
PUBLIC
supl_library
gnss_system_parameters
Boost::boost
Glog::glog
PRIVATE
Boost::serialization
Pugixml::pugixml
Gflags::gflags
)
set_property(TARGET rx_core_lib
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/core/interfaces>
)

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.
#
@ -25,25 +25,28 @@ set(SUPL_SOURCES
supl.c
)
if(OPENSSL_FOUND)
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/libs/supl
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl
${GNUTLS_INCLUDE_DIR}
)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
if(CMAKE_BUILD_TYPE MATCHES "Release")
set(MY_C_FLAGS "${MY_C_FLAGS} -Wno-parentheses-equality")
endif()
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MY_C_FLAGS}")
add_library(supl_library STATIC ${ASN_RRLP_SOURCES} ${ASN_SUPL_SOURCES} ${SUPL_SOURCES})
target_link_libraries(supl_library ${GNUTLS_LIBRARIES} ${GNUTLS_OPENSSL_LIBRARY} gnss_system_parameters)
set_target_properties(supl_library PROPERTIES LINKER_LANGUAGE C)
target_link_libraries(supl_library
PUBLIC
${GNUTLS_LIBRARIES}
${GNUTLS_OPENSSL_LIBRARY}
gnss_system_parameters
)
set_target_properties(supl_library PROPERTIES
LINKER_LANGUAGE C
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl;${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp;${GNUTLS_INCLUDE_DIR}"
)
if(OPENSSL_FOUND)
target_compile_definitions(supl_library PUBLIC -DUSE_OPENSSL_FALLBACK=1)
endif()

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.
#
@ -27,15 +27,6 @@ set(CORE_MONITOR_LIBS_HEADERS
gnss_synchro_udp_sink.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
list(SORT CORE_MONITOR_LIBS_HEADERS)
list(SORT CORE_MONITOR_LIBS_SOURCES)
@ -46,6 +37,16 @@ add_library(core_monitor_lib
source_group(Headers FILES ${CORE_MONITOR_LIBS_HEADERS})
target_link_libraries(core_monitor_lib ${Boost_LIBRARIES})
target_link_libraries(core_monitor_lib
PUBLIC
Boost::serialization
gnss_system_parameters
Gnuradio::runtime
PRIVATE
Glog::glog
)
add_dependencies(core_monitor_lib glog-${glog_RELEASE})
set_property(TARGET core_monitor_lib
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

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.
#
@ -40,137 +40,31 @@ set(GNSS_RECEIVER_HEADERS
control_message.h
)
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
add_definitions(-DMODERN_GNURADIO=1)
endif()
if(ENABLE_CUDA)
add_definitions(-DCUDA_GPU_ACCEL=1)
set(OPT_RECEIVER_INCLUDE_DIRS
${OPT_RECEIVER_INCLUDE_DIRS} ${CUDA_INCLUDE_DIRS}
)
endif()
if(ENABLE_FPGA)
add_definitions(-DENABLE_FPGA=1)
endif()
if(ENABLE_RAW_UDP)
add_definitions(-DRAW_UDP=1)
endif()
if(Boost_VERSION LESS 105000)
add_definitions(-DOLD_BOOST=1)
endif()
if(OPENSSL_FOUND)
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
endif()
if(ENABLE_GN3S)
add_definitions(-DGN3S_DRIVER=1)
endif()
if(ENABLE_ARRAY)
add_definitions(-DRAW_ARRAY_DRIVER=1)
endif()
if(ENABLE_FLEXIBAND)
add_definitions(-DFLEXIBAND_DRIVER=1)
endif()
if(ENABLE_OSMOSDR)
if(GROSMOSDR_FOUND)
add_definitions(-DOSMOSDR_DRIVER=1)
endif()
endif()
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
add_definitions(-DUHD_DRIVER=1)
endif()
#Enable OpenCL if found in the system
if(OPENCL_FOUND)
message(STATUS "Adding processing blocks implemented using OpenCL")
add_definitions(-DOPENCL_BLOCKS=1)
else()
add_definitions(-DOPENCL_BLOCKS=0)
endif()
#enable SDR Hardware based on fmcomms2
if(ENABLE_PLUTOSDR)
add_definitions(-DPLUTOSDR_DRIVER=1)
set(OPT_RECEIVER_INCLUDE_DIRS
${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}
)
endif()
if(ENABLE_FMCOMMS2)
add_definitions(-DFMCOMMS2_DRIVER=1)
set(OPT_RECEIVER_INCLUDE_DIRS
${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}
)
endif()
if(ENABLE_AD9361)
add_definitions(-DAD9361_DRIVER=1)
set(OPT_RECEIVER_INCLUDE_DIRS
${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS}
)
endif()
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
add_definitions(-DGR_GREATER_38=1)
if(ENABLE_CUDA)
set(OPT_RECEIVER_INCLUDE_DIRS
${OPT_RECEIVER_INCLUDE_DIRS} ${CUDA_INCLUDE_DIRS}
)
endif()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/libs
${CMAKE_SOURCE_DIR}/src/core/libs/supl
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl
${CMAKE_SOURCE_DIR}/src/core/monitor
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/libs
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/channel/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/channel/libs
${CMAKE_SOURCE_DIR}/src/algorithms/conditioner/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/data_type_adapter/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/data_type_adapter/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/resampler/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/input_filter/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/input_filter/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/libs
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs/libswiftcnav
${CMAKE_SOURCE_DIR}/src/algorithms/observables/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/observables/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${ARMADILLO_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${PUGIXML_INCLUDE_DIR}
${OPT_RECEIVER_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
list(SORT GNSS_RECEIVER_HEADERS)
list(SORT GNSS_RECEIVER_SOURCES)
@ -196,29 +90,104 @@ add_library(gnss_rx
source_group(Headers FILES ${GNSS_RECEIVER_HEADERS}
${GNSS_RECEIVER_INTERFACE_HEADERS})
if(ENABLE_FPGA)
target_compile_definitions(gnss_rx PUBLIC -DENABLE_FPGA=1)
endif()
if(ENABLE_RAW_UDP)
target_compile_definitions(gnss_rx PUBLIC -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)
endif()
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
target_compile_definitions(gnss_rx PUBLIC -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)
endif()
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
target_compile_definitions(gnss_rx PUBLIC -DUHD_DRIVER=1)
endif()
if(ENABLE_PLUTOSDR)
target_compile_definitions(gnss_rx PUBLIC -DPLUTOSDR_DRIVER=1)
endif()
if(ENABLE_FMCOMMS2)
target_compile_definitions(gnss_rx PUBLIC -DFMCOMMS2_DRIVER=1)
endif()
if(ENABLE_AD9361)
target_compile_definitions(gnss_rx PUBLIC -DAD9361_DRIVER=1)
endif()
if(ENABLE_OSMOSDR)
if(GROSMOSDR_FOUND)
target_compile_definitions(gnss_rx PUBLIC -DOSMOSDR_DRIVER=1)
endif()
endif()
if(ENABLE_GN3S)
target_compile_definitions(gnss_rx PUBLIC -DGN3S_DRIVER=1)
endif()
if(ENABLE_ARRAY)
target_compile_definitions(gnss_rx PUBLIC -DRAW_ARRAY_DRIVER=1)
endif()
if(ENABLE_FLEXIBAND)
target_compile_definitions(gnss_rx PUBLIC -DFLEXIBAND_DRIVER=1)
endif()
if(OPENCL_FOUND)
message(STATUS "Adding processing blocks implemented using OpenCL")
target_compile_definitions(gnss_rx PUBLIC -DOPENCL_BLOCKS=1)
else()
target_compile_definitions(gnss_rx PUBLIC -DOPENCL_BLOCKS=0)
endif()
if(ENABLE_CUDA)
target_compile_definitions(gnss_rx PUBLIC -DCUDA_GPU_ACCEL=1)
endif()
target_link_libraries(gnss_rx
${Boost_LIBRARIES}
${ARMADILLO_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
gnss_system_parameters
gnss_sp_libs
signal_source_adapters
datatype_adapters
input_filter_adapters
conditioner_adapters
resampler_adapters
acq_adapters
tracking_adapters
channel_adapters
telemetry_decoder_libswiftcnav
telemetry_decoder_lib
telemetry_decoder_adapters
obs_adapters
pvt_adapters
pvt_lib
rx_core_lib
core_monitor_lib
PUBLIC
Boost::boost
Boost::thread
Gnuradio::runtime
gnss_system_parameters
rx_core_lib
core_monitor_lib
gnss_sp_libs
PRIVATE
Glog::glog
signal_source_adapters
datatype_adapters
input_filter_adapters
conditioner_adapters
resampler_adapters
acq_adapters
tracking_adapters
channel_adapters
telemetry_decoder_adapters
obs_adapters
pvt_adapters
Volkgnsssdr::volkgnsssdr
)
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}>
)

View File

@ -289,7 +289,8 @@ void GNSSFlowgraph::connect()
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file" << std::endl;
throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration"));
}
ch_out_sample_counter = gnss_sdr_make_sample_counter(fs, sig_conditioner_.at(0)->get_right_block()->output_signature()->sizeof_stream_item(0));
int observable_interval_ms = static_cast<double>(configuration_->property("GNSS-SDR.observable_interval_ms", 20));
ch_out_sample_counter = gnss_sdr_make_sample_counter(fs, observable_interval_ms, sig_conditioner_.at(0)->get_right_block()->output_signature()->sizeof_stream_item(0));
top_block_->connect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter, 0);
top_block_->connect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_); //extra port for the sample counter pulse
}

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.
#
@ -100,16 +100,6 @@ set(SYSTEM_PARAMETERS_HEADERS
MATH_CONSTANTS.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${GLOG_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
)
list(SORT SYSTEM_PARAMETERS_HEADERS)
list(SORT SYSTEM_PARAMETERS_SOURCES)
@ -120,6 +110,18 @@ add_library(gnss_system_parameters
source_group(Headers FILES ${SYSTEM_PARAMETERS_HEADERS})
add_dependencies(gnss_system_parameters rtklib_lib glog-${glog_RELEASE})
target_link_libraries(gnss_system_parameters
PUBLIC
Boost::date_time
Boost::serialization
gnss_rx
rtklib_lib
PRIVATE
Gflags::gflags
Glog::glog
)
target_link_libraries(gnss_system_parameters rtklib_lib ${Boost_LIBRARIES})
set_property(TARGET gnss_system_parameters
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

View File

@ -30,12 +30,12 @@
*/
#include "beidou_dnav_navigation_message.h"
#include "gnss_satellite.h"
#include <boost/crc.hpp> // for boost::crc_basic, boost::crc_optimal
#include <boost/dynamic_bitset.hpp>
#include <glog/logging.h>
#include <cmath>
#include <cstring>
#include <gnss_satellite.h>
#include <iostream>
#include <string>

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.
#
@ -46,29 +46,6 @@ if(ORC_FOUND)
set(GNSS_SDR_OPTIONAL_HEADERS ${GNSS_SDR_OPTIONAL_HEADERS} ${ORC_INCLUDE_DIRS})
endif()
include_directories(
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/core/monitor
${CMAKE_SOURCE_DIR}/src/core/libs
${CMAKE_SOURCE_DIR}/src/core/libs/supl
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${PUGIXML_INCLUDE_DIR}
${GNSS_SDR_OPTIONAL_HEADERS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${OPT_GNSSSDR_INCLUDE_DIRS}
)
add_definitions(-DGNSS_SDR_VERSION="${VERSION}")
if(OS_IS_MACOSX)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(MAC_LIBRARIES "-framework Accelerate -lc++")
@ -77,29 +54,38 @@ endif()
add_executable(gnss-sdr ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
target_include_directories(gnss-sdr PRIVATE
${GNSS_SDR_OPTIONAL_HEADERS}
${OPT_GNSSSDR_INCLUDE_DIRS}
)
target_compile_definitions(gnss-sdr PUBLIC -DGNSS_SDR_VERSION="${VERSION}")
add_custom_command(TARGET gnss-sdr
POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:gnss-sdr>
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:gnss-sdr>
)
target_link_libraries(gnss-sdr
${MAC_LIBRARIES}
${THREAD_LIBRARIES}
${Boost_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${ARMADILLO_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES}
${GNSS_SDR_OPTIONAL_LIBS}
gnss_sp_libs
gnss_sdr_flags
gnss_rx
PUBLIC
Boost::filesystem
Boost::system
gnss_sdr_flags
gnss_system_parameters
gnss_sp_libs
gnss_rx
${MAC_LIBRARIES}
${THREAD_LIBRARIES}
${GNSS_SDR_OPTIONAL_LIBS}
PRIVATE
rtklib_lib
Gflags::gflags
Glog::glog
Armadillo::armadillo
Volkgnsssdr::volkgnsssdr
)
install(TARGETS gnss-sdr
RUNTIME DESTINATION bin
COMPONENT "gnss-sdr")

View File

@ -1,4 +1,4 @@
# Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
# Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
#
# This file is part of GNSS-SDR.
#
@ -110,7 +110,7 @@ else()
add_library(gtest ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc)
set(GTEST_LIBRARIES gtest)
endif()
target_link_libraries(gtest ${THREAD_LIBRARIES})
target_link_libraries(gtest PUBLIC ${THREAD_LIBRARIES})
endif()
@ -141,10 +141,6 @@ if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
add_definitions(-DGR_GREATER_38=1)
endif()
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.15")
add_definitions(-DGR_GREATER_38=1)
endif()
if(OPENSSL_FOUND)
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
endif()
@ -234,7 +230,6 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
endif()
include(GNUInstallDirs)
string(REGEX REPLACE /[^/]*$ "" LIBDIR ${CMAKE_INSTALL_LIBDIR})
if(CMAKE_VERSION VERSION_LESS 3.2)
ExternalProject_Add(
gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
@ -254,29 +249,32 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF
BUILD_BYPRODUCTS ${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX}
BUILD_BYPRODUCTS ${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX}
UPDATE_COMMAND ""
PATCH_COMMAND ""
)
endif()
set(GPSTK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/include CACHE PATH "Local GPSTK headers")
set(GPSTK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
set(GPSTK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
set(GPSTK_BINDIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/bin/)
add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}")
set(OWN_GPSTK True)
add_library(Gpstk::gpstk SHARED IMPORTED)
add_dependencies(Gpstk::gpstk gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION})
file(MAKE_DIRECTORY ${GPSTK_INCLUDE_DIRS})
set_target_properties(Gpstk::gpstk PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GPSTK_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${GPSTK_INCLUDE_DIRS};${GPSTK_INCLUDE_DIRS}/gpstk"
INTERFACE_LINK_LIBRARIES "${GPSTK_LIBRARY}"
)
else()
set(GPSTK_INCLUDE_DIRS ${GPSTK_INCLUDE_DIR})
set(GPSTK_BINDIR ${GPSTK_LIBRARY}/../bin/)
set(GPSTK_BINDIR ${GPSTK_INCLUDE_DIR}/../bin/)
add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}")
endif()
endif()
if(ENABLE_UNIT_TESTING_EXTRA)
set(GNSS_SDR_TEST_OPTIONAL_LIBS ${GNSS_SDR_TEST_OPTIONAL_LIBS} ${GPSTK_LIBRARY})
set(GNSS_SDR_TEST_OPTIONAL_HEADERS ${GNSS_SDR_TEST_OPTIONAL_HEADERS} ${GPSTK_INCLUDE_DIRS} ${GPSTK_INCLUDE_DIRS}/gpstk)
endif()
if(ENABLE_UNIT_TESTING_EXTRA)
add_definitions(-DEXTRA_TESTS)
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat)
@ -317,52 +315,7 @@ endif()
set(LIST_INCLUDE_DIRS
${GTEST_INCLUDE_DIRECTORIES}
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/core/libs
${CMAKE_SOURCE_DIR}/src/core/libs/supl
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl
${CMAKE_SOURCE_DIR}/src/core/monitor
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
${CMAKE_SOURCE_DIR}/src/algorithms/data_type_adapter/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/data_type_adapter/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/resampler/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/resampler/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/channel/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/channel/libs
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs
${CMAKE_SOURCE_DIR}/src/algorithms/observables/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/observables/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/signal_generator/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/signal_generator/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/input_filter/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/input_filter/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/libs
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
${CMAKE_SOURCE_DIR}/src/tests/unit-tests/signal-processing-blocks/libs
${CMAKE_SOURCE_DIR}/src/tests/system-tests/libs
${CMAKE_SOURCE_DIR}/src/tests/common-files
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${VOLK_GNSSSDR_INCLUDE_DIRS}
${MATIO_INCLUDE_DIRS}
${PUGIXML_INCLUDE_DIR}
${GNSS_SDR_TEST_OPTIONAL_HEADERS}
)
@ -374,34 +327,47 @@ include_directories(${LIST_INCLUDE_DIRS})
if(ENABLE_UNIT_TESTING)
add_executable(run_tests ${CMAKE_CURRENT_SOURCE_DIR}/test_main.cc)
target_link_libraries(run_tests ${CLANG_FLAGS}
${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${GTEST_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${GNURADIO_ANALOG_LIBRARIES}
${ARMADILLO_LIBRARIES}
${VOLK_LIBRARIES}
channel_fsm
gnss_sp_libs
gnss_rx
gnss_system_parameters
signal_generator_blocks
signal_generator_adapters
pvt_gr_blocks
signal_processing_testing_lib
system_testing_lib
${VOLK_GNSSSDR_LIBRARIES}
${MATIO_LIBRARIES}
${GNSS_SDR_TEST_OPTIONAL_LIBS}
target_link_libraries(run_tests
PUBLIC
${CLANG_FLAGS}
Boost::filesystem
Armadillo::armadillo
Gflags::gflags
Glog::glog
Gnuradio::runtime
Gnuradio::blocks
Gnuradio::filter
Gnuradio::analog
Matio::matio
Volk::volk
Volkgnsssdr::volkgnsssdr
${GTEST_LIBRARIES}
gnss_sp_libs
gnss_rx
gnss_system_parameters
core_monitor_lib
signal_source_adapters
datatype_adapters
input_filter_adapters
resampler_adapters
channel_adapters
acq_adapters
tracking_adapters
tracking_lib
telemetry_decoder_adapters
obs_adapters
signal_generator_adapters
pvt_adapters
signal_processing_testing_lib
system_testing_lib
${GNSS_SDR_TEST_OPTIONAL_LIBS}
)
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(run_tests gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
endif()
if(ENABLE_UNIT_TESTING_EXTRA)
target_link_libraries(run_tests PUBLIC Gpstk::gpstk)
endif()
if(ENABLE_INSTALL_TESTS)
if(EXISTS ${CMAKE_SOURCE_DIR}/install/run_tests)
file(REMOVE ${CMAKE_SOURCE_DIR}/install/run_tests)
@ -420,20 +386,23 @@ if(ENABLE_FPGA)
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc
)
target_link_libraries(gps_l1_ca_dll_pll_tracking_test_fpga
${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${GTEST_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${ARMADILLO_LIBRARIES}
${VOLK_LIBRARIES}
${MATIO_LIBRARIES}
channel_fsm
gnss_sp_libs
gnss_rx
gnss_system_parameters
signal_processing_testing_lib
PUBLIC
${Boost_LIBRARIES}
Gflags::gflags
Glog::glog
${GTEST_LIBRARIES}
Gnuradio::runtime
Gnuradio::blocks
Armadillo::armadillo
Volk::volk
Matio::matio
channel_fsm
gnss_sp_libs
gnss_rx
datatype_adapters
gnss_system_parameters
signal_processing_testing_lib
tracking_adapters
)
install(TARGETS gps_l1_ca_dll_pll_tracking_test_fpga
RUNTIME DESTINATION bin
@ -442,7 +411,6 @@ if(ENABLE_FPGA)
endif()
################################################################################
# System testing
################################################################################
@ -462,8 +430,8 @@ function(add_system_test executable)
add_dependencies(${executable} gtest)
endif()
include_directories(${OPT_INCLUDES_})
target_link_libraries(${executable} ${OPT_LIBS_})
target_include_directories(${executable} PUBLIC ${OPT_INCLUDES_} ${CMAKE_SOURCES_DIR}/src/algorithms/libs)
target_link_libraries(${executable} PUBLIC ${OPT_LIBS_} gnss_sp_libs)
if(ENABLE_INSTALL_TESTS)
if(EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})
@ -491,22 +459,21 @@ if(ENABLE_SYSTEM_TESTING)
add_definitions(-DHOST_SYSTEM="${HOST_SYSTEM}")
#### TTFF
set(OPT_LIBS_ ${Boost_LIBRARIES} ${THREAD_LIBRARIES} ${GFlags_LIBS} ${GLOG_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES} ${GTEST_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES}
${GNURADIO_ANALOG_LIBRARIES} gnss_sp_libs
set(OPT_LIBS_ ${Boost_LIBRARIES} ${THREAD_LIBRARIES} Gflags::gflags Glog::glog
Gnuradio::runtime ${GTEST_LIBRARIES}
Gnuradio::blocks Gnuradio::filter
Gnuradio::analog gnss_sp_libs
gnss_rx gnss_system_parameters)
add_system_test(ttff)
if(ENABLE_SYSTEM_TESTING_EXTRA)
#### POSITION_TEST
set(OPT_LIBS_ ${Boost_LIBRARIES} ${THREAD_LIBRARIES} ${GFlags_LIBS} ${GLOG_LIBRARIES}
${GTEST_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES}
${GNURADIO_ANALOG_LIBRARIES} ${VOLK_GNSSSDR_LIBRARIES}
set(OPT_LIBS_ ${Boost_LIBRARIES} ${THREAD_LIBRARIES} Gflags::gflags Glog::glog
${GTEST_LIBRARIES} Gnuradio::runtime
Gnuradio::blocks Gnuradio::filter
Gnuradio::analog Matio::matio Volkgnsssdr::volkgnsssdr
gnss_sp_libs gnss_rx gnss_system_parameters
system_testing_lib)
system_testing_lib signal_processing_testing_lib)
add_system_test(position_test)
else()
# Avoid working with old executables if they were switched ON and then OFF
@ -534,17 +501,23 @@ add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
add_executable(flowgraph_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/gnss_flowgraph_test.cc)
target_link_libraries(flowgraph_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
target_link_libraries(flowgraph_test PUBLIC ${Boost_LIBRARIES}
Gflags::gflags
Glog::glog
Gnuradio::runtime
${GTEST_LIBRARIES}
gnss_sp_libs
gnss_rx
gnss_system_parameters
${VOLK_GNSSSDR_LIBRARIES}
signal_source_adapters
signal_source_gr_blocks
input_filter_adapters
channel_adapters
Volkgnsssdr::volkgnsssdr
)
target_include_directories(flowgraph_test PUBLIC ${CMAKE_SOURCE_DIR}/src/algorithms/libs)
add_test(flowgraph_test flowgraph_test)
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(flowgraph_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
@ -565,19 +538,24 @@ add_executable(gnss_block_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/adapter/adapter_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/gnss_block_factory_test.cc
)
target_link_libraries(gnss_block_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
target_link_libraries(gnss_block_test PUBLIC ${Boost_LIBRARIES}
Gflags::gflags
Glog::glog
${GTEST_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${GNURADIO_ANALOG_LIBRARIES}
Gnuradio::runtime
Gnuradio::blocks
Gnuradio::filter
Gnuradio::analog
signal_source_adapters
datatype_adapters
input_filter_adapters
channel_adapters
gnss_sp_libs
gnss_rx
gnss_system_parameters
${VOLK_GNSSSDR_LIBRARIES}
Volkgnsssdr::volkgnsssdr
)
target_include_directories(gnss_block_test PUBLIC ${CMAKE_SOURCE_DIR}/src/algorithms/libs)
add_test(gnss_block_test gnss_block_test)
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(gnss_block_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
@ -592,17 +570,18 @@ add_executable(gnuradio_block_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/sources/unpack_2bit_samples_test.cc
)
target_link_libraries(gnuradio_block_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
Gflags::gflags
Glog::glog
${GTEST_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${GNURADIO_ANALOG_LIBRARIES}
Gnuradio::runtime
Gnuradio::blocks
Gnuradio::filter
Gnuradio::analog
gnss_sp_libs
gnss_rx
gnss_system_parameters
${VOLK_GNSSSDR_LIBRARIES}
signal_source_gr_blocks
Volkgnsssdr::volkgnsssdr
)
add_test(gnuradio_block_test gnuradio_block_test)
if(NOT ${GTEST_DIR_LOCAL})
@ -617,27 +596,18 @@ set_property(TEST gnuradio_block_test PROPERTY TIMEOUT 30)
add_executable(matio_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/arithmetic/matio_test.cc
)
target_link_libraries(matio_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${GTEST_LIBRARIES}
${MATIO_LIBRARIES}
gnss_system_parameters
target_link_libraries(matio_test
PUBLIC
Gflags::gflags
Glog::glog
gnss_rx
${GTEST_LIBRARIES}
gnss_system_parameters
Matio::matio
)
add_test(matio_test matio_test)
if(NOT ${GTEST_DIR_LOCAL})
if(MATIO_FOUND)
add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
else()
add_dependencies(matio_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION} matio-${GNSSSDR_MATIO_LOCAL_VERSION})
endif()
else()
if(MATIO_FOUND)
add_dependencies(matio_test gtest)
else()
add_dependencies(matio_test gtest matio-${GNSSSDR_MATIO_LOCAL_VERSION})
endif()
endif()
set_property(TEST matio_test PROPERTY TIMEOUT 30)
#########################################################
@ -645,20 +615,25 @@ set_property(TEST matio_test PROPERTY TIMEOUT 30)
add_executable(acq_test
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc)
target_link_libraries(acq_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${GTEST_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${GNURADIO_ANALOG_LIBRARIES}
gnss_sp_libs
gnss_rx
gnss_system_parameters
signal_generator_blocks
signal_processing_testing_lib
${VOLK_GNSSSDR_LIBRARIES})
target_link_libraries(acq_test
PUBLIC
${Boost_LIBRARIES}
Gflags::gflags
Glog::glog
${GTEST_LIBRARIES}
Gnuradio::runtime
Gnuradio::blocks
Gnuradio::filter
Gnuradio::analog
gnss_sp_libs
gnss_rx
gnss_system_parameters
signal_generator_blocks
acq_adapters
signal_processing_testing_lib
Volkgnsssdr::volkgnsssdr
)
add_test(acq_test acq_test)
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(acq_test acq_test gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
@ -676,19 +651,22 @@ add_executable(trk_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/bayesian_estimation_test.cc
)
target_link_libraries(trk_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${GTEST_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${GNURADIO_ANALOG_LIBRARIES}
gnss_sp_libs
gnss_rx
gnss_system_parameters
signal_generator_blocks
${VOLK_GNSSSDR_LIBRARIES}
target_link_libraries(trk_test
PUBLIC
${Boost_LIBRARIES}
Gflags::gflags
Glog::glog
${GTEST_LIBRARIES}
Gnuradio::runtime
Gnuradio::blocks
Gnuradio::filter
Gnuradio::analog
gnss_sp_libs
gnss_rx
tracking_adapters
gnss_system_parameters
signal_generator_blocks
Volkgnsssdr::volkgnsssdr
)
add_test(trk_test trk_test)
if(NOT ${GTEST_DIR_LOCAL})
@ -708,8 +686,10 @@ if(NOT ENABLE_PACKAGING)
)
target_link_libraries(control_thread_test ${Boost_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
Gflags::gflags
Glog::glog
signal_source_adapters
gnss_sp_libs
${GTEST_LIBRARIES}
gnss_rx
)
@ -726,8 +706,7 @@ endif()
#########################################################
if(ENABLE_PACKAGING)
add_dependencies(check flowgraph_test gnss_block_test
gnuradio_block_test acq_test trk_test matio_test)
add_dependencies(check matio_test)
else()
add_dependencies(check control_thread_test flowgraph_test gnss_block_test
gnuradio_block_test acq_test trk_test matio_test)

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,15 +22,6 @@ set(SYSTEM_TESTING_LIB_SOURCES
rtklib_solver_dump_reader.cc
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${MATIO_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
)
file(GLOB SYSTEM_TESTING_LIB_HEADERS "*.h")
list(SORT SYSTEM_TESTING_LIB_HEADERS)
@ -41,11 +32,16 @@ add_library(system_testing_lib
source_group(Headers FILES ${SYSTEM_TESTING_LIB_HEADERS})
if(NOT MATIO_FOUND)
add_dependencies(system_testing_lib
armadillo-${armadillo_RELEASE}
matio-${GNSSSDR_MATIO_LOCAL_VERSION}
)
else()
add_dependencies(system_testing_lib armadillo-${armadillo_RELEASE})
endif()
target_link_libraries(system_testing_lib
PUBLIC
Armadillo::armadillo
Gflags::gflags
PRIVATE
Boost::boost
Matio::matio
)
set_property(TARGET system_testing_lib
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

View File

@ -27,16 +27,6 @@ set(SIGNAL_PROCESSING_TESTING_LIB_SOURCES
true_observables_reader.cc
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${MATIO_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
file(GLOB SIGNAL_PROCESSING_TESTING_LIB_HEADERS "*.h")
list(SORT SIGNAL_PROCESSING_TESTING_LIB_HEADERS)
@ -47,10 +37,18 @@ add_library(signal_processing_testing_lib
source_group(Headers FILES ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS})
if(NOT MATIO_FOUND)
add_dependencies(signal_processing_testing_lib
matio-${GNSSSDR_MATIO_LOCAL_VERSION} glog-${glog_RELEASE}
)
else()
add_dependencies(signal_processing_testing_lib glog-${glog_RELEASE})
endif()
target_link_libraries(signal_processing_testing_lib
PUBLIC
Armadillo::armadillo
Gflags::gflags
Gnuradio::runtime
PRIVATE
Boost::boost
Matio::matio
Glog::glog
)
set_property(TARGET signal_processing_testing_lib
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

View File

@ -31,6 +31,7 @@
*/
#include "GPS_L1_CA.h"
#include "acquisition_msg_rx.h"
#include "galileo_e5a_noncoherent_iq_acquisition_caf.h"
#include "galileo_e5a_pcps_acquisition.h"
#include "gnss_block_factory.h"
@ -60,59 +61,6 @@
#include <vector>
// ######## GNURADIO ACQUISITION BLOCK MESSAGE RECEVER #########
class Acquisition_msg_rx;
typedef boost::shared_ptr<Acquisition_msg_rx> Acquisition_msg_rx_sptr;
Acquisition_msg_rx_sptr Acquisition_msg_rx_make();
class Acquisition_msg_rx : public gr::block
{
private:
friend Acquisition_msg_rx_sptr Acquisition_msg_rx_make();
void msg_handler_events(pmt::pmt_t msg);
Acquisition_msg_rx();
public:
int rx_message;
gr::top_block_sptr top_block;
~Acquisition_msg_rx(); //!< Default destructor
};
Acquisition_msg_rx_sptr Acquisition_msg_rx_make()
{
return Acquisition_msg_rx_sptr(new Acquisition_msg_rx());
}
void Acquisition_msg_rx::msg_handler_events(pmt::pmt_t msg)
{
try
{
int64_t message = pmt::to_long(msg);
rx_message = message;
top_block->stop(); //stop the flowgraph
}
catch (boost::bad_any_cast& e)
{
LOG(WARNING) << "msg_handler_acquisition Bad cast!\n";
rx_message = 0;
}
}
Acquisition_msg_rx::Acquisition_msg_rx() : gr::block("Acquisition_msg_rx", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
{
this->message_port_register_in(pmt::mp("events"));
this->set_msg_handler(pmt::mp("events"), boost::bind(&Acquisition_msg_rx::msg_handler_events, this, _1));
rx_message = 0;
}
Acquisition_msg_rx::~Acquisition_msg_rx() {}
// ######## GNURADIO TRACKING BLOCK MESSAGE RECEVER #########
class TrackingPullInTestFpga_msg_rx;

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.
#
@ -17,62 +17,34 @@
#
if(OPENSSL_FOUND)
add_definitions(-DUSE_OPENSSL_FALLBACK=1)
endif()
set(FRONT_END_CAL_SOURCES front_end_cal.cc)
set(FRONT_END_CAL_HEADERS front_end_cal.h)
include_directories(
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/core/libs
${CMAKE_SOURCE_DIR}/src/core/libs/supl
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-rrlp
${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/adapters
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/libs
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GLOG_INCLUDE_DIRS}
${GFlags_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${GNURADIO_BLOCKS_INCLUDE_DIRS}
${ARMADILLO_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PUGIXML_INCLUDE_DIR}
${VOLK_GNSSSDR_INCLUDE_DIRS}
)
add_library(front_end_cal_lib ${FRONT_END_CAL_SOURCES} ${FRONT_END_CAL_HEADERS})
source_group(Headers FILES ${FRONT_END_CAL_HEADERS})
target_link_libraries(front_end_cal_lib
${MAC_LIBRARIES}
${THREAD_LIBRARIES}
${Boost_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${ARMADILLO_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES}
${GNSS_SDR_OPTIONAL_LIBS}
rx_core_lib
gnss_sdr_flags
gnss_rx
channel_fsm
PUBLIC
Armadillo::armadillo
${MAC_LIBRARIES}
${THREAD_LIBRARIES}
acq_adapters
Volkgnsssdr::volkgnsssdr ${ORC_LIBRARIES}
${GNSS_SDR_OPTIONAL_LIBS}
rx_core_lib
gnss_sdr_flags
gnss_rx
channel_fsm
gnss_sp_libs
PRIVATE
Glog::glog
Gnuradio::blocks
Gnuradio::runtime
Boost::boost
Boost::serialization
Boost::thread
)
add_dependencies(front_end_cal_lib glog-${glog_RELEASE} armadillo-${armadillo_RELEASE})
add_definitions(-DGNSS_SDR_VERSION="${VERSION}")
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
add_executable(front-end-cal ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
add_custom_command(TARGET front-end-cal POST_BUILD
@ -80,20 +52,22 @@ add_custom_command(TARGET front-end-cal POST_BUILD
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:front-end-cal>)
target_link_libraries(front-end-cal
${MAC_LIBRARIES}
${Boost_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES}
${GNURADIO_BLOCKS_LIBRARIES}
${GNURADIO_FFT_LIBRARIES}
${GNURADIO_FILTER_LIBRARIES}
${GFlags_LIBS}
${GLOG_LIBRARIES}
${ARMADILLO_LIBRARIES}
${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES}
${GNSS_SDR_OPTIONAL_LIBS}
rx_core_lib
gnss_rx
front_end_cal_lib
PUBLIC
${MAC_LIBRARIES}
Volkgnsssdr::volkgnsssdr ${ORC_LIBRARIES}
${GNSS_SDR_OPTIONAL_LIBS}
rx_core_lib
gnss_rx
front_end_cal_lib
gnss_sdr_flags
PRIVATE
Glog::glog
Armadillo::armadillo
)
target_compile_definitions(front-end-cal
PUBLIC -DGNSS_SDR_VERSION="${VERSION}"
PUBLIC -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
)
install(TARGETS front-end-cal

View File

@ -19,14 +19,35 @@
find_package(GPSTK QUIET)
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
include(GNUInstallDirs)
string(REGEX REPLACE /[^/]*$ "" LIBDIR ${CMAKE_INSTALL_LIBDIR})
set(GPSTK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
#string(REGEX REPLACE /[^/]*$ "" LIBDIR ${CMAKE_INSTALL_LIBDIR})
set(GPSTK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
set(GPSTK_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/include)
endif()
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GPSTK_INCLUDE_DIR}/gpstk)
find_package(Boost COMPONENTS iostreams serialization QUIET)
if(CMAKE_VERSION VERSION_LESS 3.5)
if(NOT TARGET Boost::iostreams)
add_library(Boost::iostreams IMPORTED SHARED)
set_property(TARGET Boost::iostreams PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
set_property(TARGET Boost::iostreams PROPERTY
INTERFACE_LINK_LIBRARIES ${Boost_IOSTREAMS_LIBRARIES})
set_property(TARGET Boost::iostreams PROPERTY
IMPORTED_LOCATION ${Boost_IOSTREAMS_LIBRARIES})
endif()
if(NOT TARGET Boost::serialization)
add_library(Boost::serialization IMPORTED SHARED)
set_property(TARGET Boost::serialization PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
set_property(TARGET Boost::serialization PROPERTY
INTERFACE_LINK_LIBRARIES ${Boost_SERIALIZARION_LIBRARIES})
set_property(TARGET Boost::serialization PROPERTY
IMPORTED_LOCATION ${Boost_SERIALIZARION_LIBRARIES})
endif()
endif()
find_program(UNCOMPRESS_EXECUTABLE uncompress
PATHS /bin
@ -34,17 +55,8 @@ find_program(UNCOMPRESS_EXECUTABLE uncompress
/usr/sbin
)
if(NOT UNCOMPRESS_EXECUTABLE-NOTFOUND)
add_definitions(-DUNCOMPRESS_EXECUTABLE="${UNCOMPRESS_EXECUTABLE}")
else()
add_definitions(-DUNCOMPRESS_EXECUTABLE="")
endif()
if(Boost_FOUND)
include_directories(
${CMAKE_SOURCE_DIR}/src/core/system_parameters
${GFlags_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${GPSTK_INCLUDE_DIR}/gpstk
${GPSTK_INCLUDE_DIR}
)
@ -54,13 +66,22 @@ if(Boost_FOUND)
add_executable(rinex2assist ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
target_link_libraries(rinex2assist
${Boost_LIBRARIES}
${GPSTK_LIBRARY}
${GFlags_LIBS}
gnss_sp_libs
gnss_rx
PUBLIC
Boost::iostreams
Boost::serialization
${GPSTK_LIBRARY}
Gflags::gflags
gnss_system_parameters
gnss_sp_libs
gnss_rx
)
if(NOT UNCOMPRESS_EXECUTABLE-NOTFOUND)
target_compile_definitions(rinex2assist PUBLIC -DUNCOMPRESS_EXECUTABLE="${UNCOMPRESS_EXECUTABLE}")
else()
target_compile_definitions(rinex2assist PUBLIC -DUNCOMPRESS_EXECUTABLE="")
endif()
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
add_dependencies(rinex2assist gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION})
endif()