1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2026-05-03 12:11:26 +00:00

Allow the CMake project to be a sub-project

This commit is contained in:
Carles Fernandez
2022-07-28 10:37:36 +02:00
parent d7eaffaae0
commit 6ec452a7c0
42 changed files with 388 additions and 383 deletions

View File

@@ -29,7 +29,7 @@ target_link_libraries(pvt_adapters
target_include_directories(pvt_adapters
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(USE_OLD_BOOST_MATH_COMMON_FACTOR)

View File

@@ -40,7 +40,7 @@ endif()
target_include_directories(pvt_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(USE_GENERIC_LAMBDAS)

View File

@@ -4,9 +4,9 @@
# SPDX-FileCopyrightText: 2010-2020 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${CMAKE_SOURCE_DIR}/docs/protobuf/monitor_pvt.proto)
protobuf_generate_cpp(PROTO_SRCS2 PROTO_HDRS2 ${CMAKE_SOURCE_DIR}/docs/protobuf/gps_ephemeris.proto)
protobuf_generate_cpp(PROTO_SRCS3 PROTO_HDRS3 ${CMAKE_SOURCE_DIR}/docs/protobuf/galileo_ephemeris.proto)
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${GNSSSDR_SOURCE_DIR}/docs/protobuf/monitor_pvt.proto)
protobuf_generate_cpp(PROTO_SRCS2 PROTO_HDRS2 ${GNSSSDR_SOURCE_DIR}/docs/protobuf/gps_ephemeris.proto)
protobuf_generate_cpp(PROTO_SRCS3 PROTO_HDRS3 ${GNSSSDR_SOURCE_DIR}/docs/protobuf/galileo_ephemeris.proto)
set(PVT_LIB_SOURCES
an_packet_printer.cc
@@ -98,7 +98,7 @@ get_filename_component(PROTO_INCLUDE_HEADERS_DIR ${PROTO_HDRS} DIRECTORY)
# for concurrent_queue.h
target_include_directories(pvt_libs
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/receiver
${GNSSSDR_SOURCE_DIR}/src/core/receiver
)
# Do not apply clang-tidy fixes to protobuf generated headers

View File

@@ -129,7 +129,7 @@ endif()
target_include_directories(acquisition_adapters
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(ENABLE_CLANG_TIDY)

View File

@@ -72,7 +72,7 @@ target_link_libraries(acquisition_gr_blocks
target_include_directories(acquisition_gr_blocks
PRIVATE
${CMAKE_SOURCE_DIR}/src/core/receiver
${GNSSSDR_SOURCE_DIR}/src/core/receiver
)
if(GNURADIO_USES_STD_POINTERS)
@@ -97,7 +97,7 @@ if(ENABLE_OPENCL)
target_link_libraries(acquisition_gr_blocks PUBLIC OpenCL::OpenCL)
target_include_directories(acquisition_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/algorithms/libs/opencl
${GNSSSDR_SOURCE_DIR}/src/algorithms/libs/opencl
)
endif()
@@ -113,5 +113,5 @@ endif()
set_property(TARGET acquisition_gr_blocks
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/algorithms/libs/opencl>
$<BUILD_INTERFACE:${GNSSSDR_SOURCE_DIR}/src/algorithms/libs/opencl>
)

View File

@@ -31,8 +31,8 @@ target_link_libraries(channel_adapters
target_include_directories(channel_adapters
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/receiver
)
if(ENABLE_CLANG_TIDY)

View File

@@ -45,7 +45,7 @@ target_link_libraries(channel_libs
target_include_directories(channel_libs
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/receiver
${GNSSSDR_SOURCE_DIR}/src/core/receiver
)
if(GNURADIO_USES_STD_POINTERS)

View File

@@ -52,7 +52,7 @@ endif()
target_include_directories(conditioner_adapters
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(ENABLE_CLANG_TIDY)

View File

@@ -44,7 +44,7 @@ endif()
target_include_directories(data_type_adapters
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
target_link_libraries(data_type_adapters

View File

@@ -46,7 +46,7 @@ target_link_libraries(data_type_gr_blocks
target_include_directories(data_type_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(GNURADIO_USES_STD_POINTERS)

View File

@@ -65,7 +65,7 @@ endif()
target_include_directories(input_filter_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(GNURADIO_USES_STD_POINTERS)

View File

@@ -94,7 +94,7 @@ endif()
if(NOT has_span)
target_include_directories(algorithms_libs
PUBLIC
${CMAKE_SOURCE_DIR}/src/algorithms/libs/gsl/include
${GNSSSDR_SOURCE_DIR}/src/algorithms/libs/gsl/include
)
endif()
@@ -164,7 +164,7 @@ endif()
target_include_directories(algorithms_libs
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
target_compile_definitions(algorithms_libs

View File

@@ -491,8 +491,8 @@ endif()
########################################################################
configure_file(
${CMAKE_SOURCE_DIR}/cmake/Modules/VolkGnsssdrConfig.cmake.in
${CMAKE_BINARY_DIR}/cmake/Modules/VolkGnsssdrConfig.cmake
${PROJECT_SOURCE_DIR}/cmake/Modules/VolkGnsssdrConfig.cmake.in
${PROJECT_BINARY_DIR}/cmake/Modules/VolkGnsssdrConfig.cmake
@ONLY
)

View File

@@ -20,7 +20,7 @@ endif()
target_include_directories(obs_adapters
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
target_link_libraries(obs_adapters

View File

@@ -20,7 +20,7 @@ endif()
target_include_directories(obs_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GNSSSDR_SOURCE_DIR}/src/algorithms/libs
)
target_link_libraries(obs_gr_blocks
@@ -47,7 +47,7 @@ endif()
target_include_directories(obs_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(GNURADIO_USES_STD_POINTERS)

View File

@@ -45,7 +45,7 @@ target_link_libraries(resampler_adapters
target_include_directories(resampler_adapters
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(GNURADIO_IS_38_OR_GREATER)

View File

@@ -60,7 +60,7 @@ endif()
target_include_directories(resampler_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(ENABLE_CLANG_TIDY)

View File

@@ -34,8 +34,8 @@ target_link_libraries(signal_generator_adapters
target_include_directories(signal_generator_adapters
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/core/receiver
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/receiver
)
if(GNURADIO_USES_STD_POINTERS)

View File

@@ -38,7 +38,7 @@ endif()
target_include_directories(signal_generator_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
# Workaround for CentOS 7

View File

@@ -146,7 +146,7 @@ endif()
target_include_directories(signal_source_adapters
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(ENABLE_FPGA OR ENABLE_AD9361)

View File

@@ -72,7 +72,7 @@ target_link_libraries(signal_source_gr_blocks
target_include_directories(signal_source_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/receiver
${GNSSSDR_SOURCE_DIR}/src/core/receiver
)
if(GNURADIO_USES_STD_POINTERS)

View File

@@ -69,9 +69,9 @@ target_link_libraries(signal_source_libs
target_include_directories(signal_source_libs
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/receiver
${CMAKE_SOURCE_DIR}/src/core/interfaces
${CMAKE_SOURCE_DIR}/src/algorithms/libs
${GNSSSDR_SOURCE_DIR}/src/core/receiver
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/algorithms/libs
)
if(GNURADIO_USES_STD_POINTERS)

View File

@@ -66,7 +66,7 @@ target_link_libraries(telemetry_decoder_adapters
target_include_directories(telemetry_decoder_adapters
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(ENABLE_CLANG_TIDY)

View File

@@ -79,12 +79,12 @@ endif()
target_include_directories(telemetry_decoder_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
target_include_directories(telemetry_decoder_gr_blocks
PRIVATE
${CMAKE_SOURCE_DIR}/src/algorithms/libs # for gnss_sdr_make_unique.h
${GNSSSDR_SOURCE_DIR}/src/algorithms/libs # for gnss_sdr_make_unique.h
)
if(has_rotl)

View File

@@ -54,7 +54,7 @@ target_link_libraries(telemetry_decoder_libs
target_include_directories(telemetry_decoder_libs
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(ENABLE_CLANG_TIDY)

View File

@@ -105,7 +105,7 @@ target_link_libraries(tracking_adapters
target_include_directories(tracking_adapters
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(ENABLE_FPGA)

View File

@@ -96,7 +96,7 @@ endif()
target_include_directories(tracking_gr_blocks
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(ENABLE_CUDA)

View File

@@ -144,7 +144,7 @@ endif()
target_include_directories(tracking_libs
PUBLIC
${CMAKE_SOURCE_DIR}/src/core/interfaces
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(ENABLE_CLANG_TIDY)