mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-30 21:58:08 +00:00
Update to modern CMake usage
This commit is contained in:
@@ -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}>
|
||||
)
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#include "rtklib_solver.h"
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
|
||||
|
||||
@@ -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<<
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user