2020-12-30 12:35:06 +00:00
|
|
|
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
2012-12-24 02:33:50 +00:00
|
|
|
# This file is part of GNSS-SDR.
|
|
|
|
#
|
2020-12-30 12:35:06 +00:00
|
|
|
# SPDX-FileCopyrightText: 2010-2020 C. Fernandez-Prades cfernandez(at)cttc.es
|
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2012-12-24 02:33:50 +00:00
|
|
|
|
2022-07-28 08:37:36 +00:00
|
|
|
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${GNSSSDR_SOURCE_DIR}/docs/protobuf/nav_message.proto)
|
2021-09-05 22:05:29 +00:00
|
|
|
|
2013-03-14 18:29:46 +00:00
|
|
|
add_subdirectory(supl)
|
|
|
|
|
2018-11-18 20:24:54 +00:00
|
|
|
set(CORE_LIBS_SOURCES
|
2018-10-04 20:35:44 +00:00
|
|
|
ini.cc
|
|
|
|
INIReader.cc
|
2013-07-06 00:01:06 +00:00
|
|
|
string_converter.cc
|
|
|
|
gnss_sdr_supl_client.cc
|
2019-03-06 22:59:35 +00:00
|
|
|
gnss_sdr_sample_counter.cc
|
2019-07-11 16:39:28 +00:00
|
|
|
channel_status_msg_receiver.cc
|
2019-07-16 17:20:37 +00:00
|
|
|
channel_event.cc
|
2019-07-21 10:55:59 +00:00
|
|
|
command_event.cc
|
2021-06-02 15:13:46 +00:00
|
|
|
galileo_e6_has_msg_receiver.cc
|
2021-09-05 22:05:29 +00:00
|
|
|
nav_message_monitor.cc
|
|
|
|
nav_message_udp_sink.cc
|
2022-06-01 08:33:36 +00:00
|
|
|
galileo_tow_map.cc
|
2013-07-06 00:01:06 +00:00
|
|
|
)
|
2018-10-04 20:35:44 +00:00
|
|
|
|
2018-11-18 20:24:54 +00:00
|
|
|
set(CORE_LIBS_HEADERS
|
2018-10-04 20:35:44 +00:00
|
|
|
ini.h
|
|
|
|
INIReader.h
|
|
|
|
string_converter.h
|
|
|
|
gnss_sdr_supl_client.h
|
2019-03-06 22:59:35 +00:00
|
|
|
gnss_sdr_sample_counter.h
|
2019-07-11 16:39:28 +00:00
|
|
|
channel_status_msg_receiver.h
|
2019-07-16 17:20:37 +00:00
|
|
|
channel_event.h
|
2019-07-21 10:55:59 +00:00
|
|
|
command_event.h
|
2021-09-05 22:05:29 +00:00
|
|
|
nav_message_packet.h
|
|
|
|
nav_message_udp_sink.h
|
|
|
|
serdes_nav_message.h
|
|
|
|
nav_message_monitor.h
|
2022-06-01 08:33:36 +00:00
|
|
|
galileo_tow_map.h
|
2018-10-04 20:35:44 +00:00
|
|
|
)
|
2018-11-18 20:24:54 +00:00
|
|
|
|
2019-03-06 22:59:35 +00:00
|
|
|
if(ENABLE_FPGA)
|
|
|
|
set(CORE_LIBS_SOURCES
|
|
|
|
${CORE_LIBS_SOURCES}
|
|
|
|
gnss_sdr_fpga_sample_counter.cc
|
|
|
|
gnss_sdr_time_counter.cc
|
|
|
|
)
|
|
|
|
set(CORE_LIBS_HEADERS
|
|
|
|
${CORE_LIBS_HEADERS}
|
|
|
|
gnss_sdr_fpga_sample_counter.h
|
|
|
|
gnss_sdr_time_counter.h
|
2020-11-29 09:18:35 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ENABLE_FPGA OR ENABLE_AD9361)
|
|
|
|
set(CORE_LIBS_SOURCES
|
|
|
|
${CORE_LIBS_SOURCES}
|
|
|
|
uio_fpga.cc
|
|
|
|
)
|
|
|
|
set(CORE_LIBS_HEADERS
|
|
|
|
${CORE_LIBS_HEADERS}
|
2020-11-27 12:49:14 +00:00
|
|
|
uio_fpga.h
|
2019-03-06 22:59:35 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2016-05-23 17:51:59 +00:00
|
|
|
list(SORT CORE_LIBS_HEADERS)
|
2018-10-04 20:35:44 +00:00
|
|
|
list(SORT CORE_LIBS_SOURCES)
|
|
|
|
|
2020-06-12 22:32:40 +00:00
|
|
|
if(USE_CMAKE_TARGET_SOURCES)
|
2020-06-08 18:04:01 +00:00
|
|
|
add_library(core_libs STATIC)
|
|
|
|
target_sources(core_libs
|
|
|
|
PRIVATE
|
|
|
|
${CORE_LIBS_SOURCES}
|
2021-09-05 22:05:29 +00:00
|
|
|
${PROTO_SRCS}
|
|
|
|
${PROTO_HDRS}
|
2020-06-08 18:04:01 +00:00
|
|
|
PUBLIC
|
|
|
|
${CORE_LIBS_HEADERS}
|
|
|
|
)
|
|
|
|
else()
|
2021-09-05 22:05:29 +00:00
|
|
|
source_group(Headers FILES ${CORE_LIBS_HEADERS} ${PROTO_HDRS})
|
|
|
|
add_library(core_libs ${CORE_LIBS_SOURCES} ${CORE_LIBS_HEADERS} ${PROTO_SRCS} ${PROTO_HDRS})
|
2020-06-08 18:04:01 +00:00
|
|
|
endif()
|
2019-02-04 21:44:45 +00:00
|
|
|
|
2019-02-10 17:34:28 +00:00
|
|
|
target_link_libraries(core_libs
|
2019-02-03 18:24:44 +00:00
|
|
|
PUBLIC
|
2022-06-11 11:55:12 +00:00
|
|
|
Boost::headers
|
2020-06-15 17:23:59 +00:00
|
|
|
Gnuradio::blocks
|
2019-03-06 22:59:35 +00:00
|
|
|
Gnuradio::runtime
|
2020-06-15 17:23:59 +00:00
|
|
|
Gnuradio::pmt
|
2021-09-05 22:05:29 +00:00
|
|
|
protobuf::libprotobuf
|
2019-02-10 17:34:28 +00:00
|
|
|
core_libs_supl
|
|
|
|
core_system_parameters
|
2019-07-11 16:39:28 +00:00
|
|
|
pvt_libs
|
2021-04-19 10:27:02 +00:00
|
|
|
algorithms_libs
|
2019-02-03 18:24:44 +00:00
|
|
|
PRIVATE
|
2021-09-24 17:37:38 +00:00
|
|
|
algorithms_libs
|
2019-02-03 18:24:44 +00:00
|
|
|
Boost::serialization
|
|
|
|
Pugixml::pugixml
|
|
|
|
)
|
|
|
|
|
2024-04-29 06:27:33 +00:00
|
|
|
if(ENABLE_GLOG_AND_GFLAGS)
|
|
|
|
target_link_libraries(core_libs PRIVATE Gflags::gflags Glog::glog)
|
|
|
|
target_compile_definitions(core_libs PRIVATE -DUSE_GLOG_AND_GFLAGS=1)
|
|
|
|
else()
|
|
|
|
target_link_libraries(core_libs PRIVATE absl::flags absl::log)
|
|
|
|
endif()
|
|
|
|
|
2020-06-15 17:23:59 +00:00
|
|
|
if(USE_GENERIC_LAMBDAS AND NOT GNURADIO_USES_STD_POINTERS)
|
|
|
|
target_link_libraries(core_libs PUBLIC Boost::headers)
|
|
|
|
else()
|
|
|
|
target_link_libraries(core_libs PRIVATE Boost::headers)
|
|
|
|
endif()
|
|
|
|
|
2020-04-02 21:59:35 +00:00
|
|
|
if(GNURADIO_USES_STD_POINTERS)
|
|
|
|
target_compile_definitions(core_libs
|
|
|
|
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
|
|
|
|
)
|
|
|
|
endif()
|
2019-03-06 22:59:35 +00:00
|
|
|
|
2020-11-03 19:51:57 +00:00
|
|
|
target_include_directories(core_libs
|
|
|
|
PUBLIC
|
2022-07-28 08:37:36 +00:00
|
|
|
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
|
2020-11-03 19:51:57 +00:00
|
|
|
)
|
|
|
|
|
2020-06-12 22:32:40 +00:00
|
|
|
if(USE_GENERIC_LAMBDAS)
|
2020-04-25 20:17:15 +00:00
|
|
|
set(has_generic_lambdas HAS_GENERIC_LAMBDA=1)
|
|
|
|
set(no_has_generic_lambdas HAS_GENERIC_LAMBDA=0)
|
|
|
|
target_compile_definitions(core_libs
|
|
|
|
PRIVATE
|
|
|
|
"$<$<COMPILE_FEATURES:cxx_generic_lambdas>:${has_generic_lambdas}>"
|
|
|
|
"$<$<NOT:$<COMPILE_FEATURES:cxx_generic_lambdas>>:${no_has_generic_lambdas}>"
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
target_compile_definitions(core_libs
|
|
|
|
PRIVATE
|
|
|
|
-DHAS_GENERIC_LAMBDA=0
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-06-12 22:32:40 +00:00
|
|
|
if(USE_BOOST_BIND_PLACEHOLDERS)
|
2020-05-18 20:50:34 +00:00
|
|
|
target_compile_definitions(core_libs
|
|
|
|
PRIVATE
|
2020-06-12 22:32:40 +00:00
|
|
|
-DUSE_BOOST_BIND_PLACEHOLDERS=1
|
2020-05-18 20:50:34 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2021-09-05 22:05:29 +00:00
|
|
|
if(USE_BOOST_ASIO_IO_CONTEXT)
|
|
|
|
target_compile_definitions(core_libs
|
|
|
|
PUBLIC
|
|
|
|
-DUSE_BOOST_ASIO_IO_CONTEXT=1
|
|
|
|
)
|
2020-11-28 11:14:21 +00:00
|
|
|
endif()
|
|
|
|
|
2021-10-30 03:43:22 +00:00
|
|
|
if(PMT_USES_BOOST_ANY)
|
|
|
|
target_compile_definitions(core_libs
|
|
|
|
PRIVATE
|
|
|
|
-DPMT_USES_BOOST_ANY=1
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2021-09-05 22:05:29 +00:00
|
|
|
# Do not apply clang-tidy fixes to protobuf generated headers
|
|
|
|
get_filename_component(PROTO_INCLUDE_HEADERS_DIR ${PROTO_HDRS} DIRECTORY)
|
|
|
|
target_include_directories(core_libs
|
|
|
|
SYSTEM PUBLIC
|
|
|
|
${PROTO_INCLUDE_HEADERS_DIR}
|
|
|
|
)
|
|
|
|
|
2019-02-21 08:59:06 +00:00
|
|
|
if(ENABLE_CLANG_TIDY)
|
|
|
|
if(CLANG_TIDY_EXE)
|
|
|
|
set_target_properties(core_libs
|
|
|
|
PROPERTIES
|
|
|
|
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-02-10 17:34:28 +00:00
|
|
|
set_property(TARGET core_libs
|
2019-02-03 18:24:44 +00:00
|
|
|
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
2022-07-28 08:37:36 +00:00
|
|
|
$<BUILD_INTERFACE:${GNSSSDR_SOURCE_DIR}/src/core/interfaces>
|
2019-02-03 18:24:44 +00:00
|
|
|
)
|