2019-02-03 18:24:44 +00:00
|
|
|
# Copyright (C) 2012-2019 (see AUTHORS file for a list of contributors)
|
2012-12-24 02:33:50 +00:00
|
|
|
#
|
|
|
|
# This file is part of GNSS-SDR.
|
|
|
|
#
|
|
|
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
2014-06-28 01:55:57 +00:00
|
|
|
# (at your option) any later version.
|
2012-12-24 02:33:50 +00:00
|
|
|
#
|
|
|
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2018-05-13 20:49:11 +00:00
|
|
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
2012-12-24 02:33:50 +00:00
|
|
|
#
|
|
|
|
|
2017-04-20 14:10:12 +00:00
|
|
|
add_subdirectory(rtklib)
|
2015-02-13 01:17:00 +00:00
|
|
|
|
2018-10-04 20:35:44 +00:00
|
|
|
set(GNSS_SPLIBS_SOURCES
|
2018-11-21 23:35:21 +00:00
|
|
|
gps_l2c_signal.cc
|
|
|
|
gps_l5_signal.cc
|
|
|
|
galileo_e1_signal_processing.cc
|
|
|
|
gnss_signal_processing.cc
|
|
|
|
gps_sdr_signal_processing.cc
|
|
|
|
glonass_l1_signal_processing.cc
|
|
|
|
glonass_l2_signal_processing.cc
|
|
|
|
pass_through.cc
|
|
|
|
galileo_e5_signal_processing.cc
|
2018-12-18 21:55:36 +00:00
|
|
|
beidou_b1i_signal_processing.cc
|
2019-01-25 21:43:00 +00:00
|
|
|
beidou_b3i_signal_processing.cc
|
2018-11-21 23:35:21 +00:00
|
|
|
complex_byte_to_float_x2.cc
|
|
|
|
byte_x2_to_complex_byte.cc
|
|
|
|
cshort_to_float_x2.cc
|
|
|
|
short_x2_to_cshort.cc
|
|
|
|
complex_float_to_complex_byte.cc
|
|
|
|
conjugate_cc.cc
|
|
|
|
conjugate_sc.cc
|
|
|
|
conjugate_ic.cc
|
|
|
|
gnss_sdr_create_directory.cc
|
|
|
|
geofunctions.cc
|
2018-10-04 20:35:44 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(GNSS_SPLIBS_HEADERS
|
2018-11-21 23:35:21 +00:00
|
|
|
gps_l2c_signal.h
|
|
|
|
gps_l5_signal.h
|
|
|
|
galileo_e1_signal_processing.h
|
|
|
|
gnss_signal_processing.h
|
|
|
|
gps_sdr_signal_processing.h
|
|
|
|
glonass_l1_signal_processing.h
|
|
|
|
glonass_l2_signal_processing.h
|
|
|
|
pass_through.h
|
|
|
|
galileo_e5_signal_processing.h
|
2018-12-18 21:55:36 +00:00
|
|
|
beidou_b1i_signal_processing.h
|
2019-03-18 18:28:35 +00:00
|
|
|
beidou_b3i_signal_processing.h
|
2018-11-21 23:35:21 +00:00
|
|
|
complex_byte_to_float_x2.h
|
|
|
|
byte_x2_to_complex_byte.h
|
|
|
|
cshort_to_float_x2.h
|
|
|
|
short_x2_to_cshort.h
|
|
|
|
complex_float_to_complex_byte.h
|
|
|
|
conjugate_cc.h
|
|
|
|
conjugate_sc.h
|
|
|
|
conjugate_ic.h
|
|
|
|
gnss_sdr_create_directory.h
|
|
|
|
gnss_circular_deque.h
|
|
|
|
geofunctions.h
|
2018-10-04 20:35:44 +00:00
|
|
|
)
|
|
|
|
|
2013-10-01 20:32:04 +00:00
|
|
|
if(OPENCL_FOUND)
|
2018-04-30 18:15:00 +00:00
|
|
|
set(GNSS_SPLIBS_SOURCES ${GNSS_SPLIBS_SOURCES}
|
2018-11-21 23:35:21 +00:00
|
|
|
opencl/fft_execute.cc # Needs OpenCL
|
|
|
|
opencl/fft_setup.cc # Needs OpenCL
|
|
|
|
opencl/fft_kernelstring.cc # Needs OpenCL
|
2018-10-04 20:35:44 +00:00
|
|
|
)
|
2018-11-24 17:40:34 +00:00
|
|
|
endif()
|
2013-10-01 20:32:04 +00:00
|
|
|
|
2016-05-23 17:51:59 +00:00
|
|
|
list(SORT GNSS_SPLIBS_HEADERS)
|
2018-10-04 20:35:44 +00:00
|
|
|
list(SORT GNSS_SPLIBS_SOURCES)
|
|
|
|
|
2014-06-28 01:55:57 +00:00
|
|
|
source_group(Headers FILES ${GNSS_SPLIBS_HEADERS})
|
2013-11-15 17:45:24 +00:00
|
|
|
|
2019-02-10 17:34:28 +00:00
|
|
|
add_library(algorithms_libs ${GNSS_SPLIBS_SOURCES} ${GNSS_SPLIBS_HEADERS})
|
2019-02-04 21:44:45 +00:00
|
|
|
|
2019-06-10 19:41:13 +00:00
|
|
|
if(${FILESYSTEM_FOUND})
|
|
|
|
target_compile_definitions(algorithms_libs PRIVATE -DHAS_STD_FILESYSTEM=1)
|
2019-06-12 18:39:29 +00:00
|
|
|
if(${find_experimental})
|
|
|
|
target_compile_definitions(algorithms_libs PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
|
|
|
|
endif()
|
2019-06-10 19:41:13 +00:00
|
|
|
target_link_libraries(algorithms_libs PRIVATE std::filesystem)
|
|
|
|
else()
|
|
|
|
target_link_libraries(algorithms_libs PRIVATE Boost::filesystem Boost::system)
|
|
|
|
endif()
|
|
|
|
|
2019-06-28 23:58:12 +00:00
|
|
|
include(CheckCXXSourceCompiles)
|
|
|
|
check_cxx_source_compiles("
|
|
|
|
#include <span>
|
|
|
|
int main()
|
|
|
|
{ std::span<float> sv; }"
|
|
|
|
has_span
|
|
|
|
)
|
|
|
|
|
|
|
|
if(${has_span})
|
2019-06-28 23:28:30 +00:00
|
|
|
target_compile_definitions(algorithms_libs PUBLIC -DHAS_SPAN=1)
|
|
|
|
else()
|
|
|
|
target_include_directories(algorithms_libs
|
|
|
|
PUBLIC
|
|
|
|
${CMAKE_SOURCE_DIR}/src/algorithms/libs/gsl/include
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-02-10 17:34:28 +00:00
|
|
|
target_link_libraries(algorithms_libs
|
2019-02-03 18:24:44 +00:00
|
|
|
PUBLIC
|
2019-02-07 20:31:40 +00:00
|
|
|
Armadillo::armadillo
|
2019-02-03 18:24:44 +00:00
|
|
|
Boost::boost
|
|
|
|
Gflags::gflags
|
|
|
|
Gnuradio::runtime
|
|
|
|
Gnuradio::blocks
|
|
|
|
PRIVATE
|
2019-03-05 11:33:54 +00:00
|
|
|
core_system_parameters
|
|
|
|
Volk::volk ${ORC_LIBRARIES}
|
|
|
|
Volkgnsssdr::volkgnsssdr
|
2019-02-03 18:24:44 +00:00
|
|
|
Glog::glog
|
2013-11-15 17:45:24 +00:00
|
|
|
)
|
2015-02-13 01:17:00 +00:00
|
|
|
|
2019-06-24 09:25:18 +00:00
|
|
|
if(OPENCL_FOUND)
|
|
|
|
target_link_libraries(algorithms_libs PUBLIC OpenCL::OpenCL)
|
|
|
|
target_include_directories(algorithms_libs PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/opencl
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-02-10 17:34:28 +00:00
|
|
|
target_include_directories(algorithms_libs
|
2019-02-10 00:13:02 +00:00
|
|
|
PUBLIC
|
|
|
|
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
2013-11-15 17:45:24 +00:00
|
|
|
)
|
2015-02-13 01:17:00 +00:00
|
|
|
|
2019-02-10 17:34:28 +00:00
|
|
|
target_compile_definitions(algorithms_libs
|
2019-02-04 21:44:45 +00:00
|
|
|
PUBLIC -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
|
|
|
|
)
|
2018-02-18 11:23:55 +00:00
|
|
|
|
2019-02-10 17:34:28 +00:00
|
|
|
set_property(TARGET algorithms_libs
|
2019-02-03 18:24:44 +00:00
|
|
|
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
|
|
)
|
|
|
|
|
2019-02-21 08:59:06 +00:00
|
|
|
if(ENABLE_CLANG_TIDY)
|
|
|
|
if(CLANG_TIDY_EXE)
|
|
|
|
set_target_properties(algorithms_libs
|
|
|
|
PROPERTIES
|
|
|
|
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|
2019-02-04 21:44:45 +00:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
2018-02-18 11:23:55 +00:00
|
|
|
source_group(Headers FILES gnss_sdr_flags.h)
|
2019-02-03 18:24:44 +00:00
|
|
|
|
2019-02-04 21:44:45 +00:00
|
|
|
add_library(gnss_sdr_flags gnss_sdr_flags.cc gnss_sdr_flags.h)
|
|
|
|
|
2019-06-10 19:41:13 +00:00
|
|
|
if(${FILESYSTEM_FOUND})
|
|
|
|
target_compile_definitions(gnss_sdr_flags PRIVATE -DHAS_STD_FILESYSTEM=1)
|
2019-06-12 18:39:29 +00:00
|
|
|
if(${find_experimental})
|
2019-06-24 09:25:18 +00:00
|
|
|
target_compile_definitions(gnss_sdr_flags PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
|
2019-06-12 18:39:29 +00:00
|
|
|
endif()
|
2019-06-10 19:41:13 +00:00
|
|
|
target_link_libraries(gnss_sdr_flags PRIVATE std::filesystem)
|
|
|
|
else()
|
|
|
|
target_link_libraries(gnss_sdr_flags PRIVATE Boost::filesystem)
|
|
|
|
endif()
|
|
|
|
|
2019-02-03 18:24:44 +00:00
|
|
|
target_link_libraries(gnss_sdr_flags
|
|
|
|
PUBLIC
|
|
|
|
Gflags::gflags
|
|
|
|
)
|
2018-02-18 11:23:55 +00:00
|
|
|
|
2018-02-18 21:48:47 +00:00
|
|
|
if(${GFLAGS_GREATER_20})
|
2019-02-05 01:21:56 +00:00
|
|
|
target_compile_definitions(gnss_sdr_flags PRIVATE -DGFLAGS_GREATER_2_0=1)
|
2018-11-24 17:40:34 +00:00
|
|
|
endif()
|
2018-02-18 21:48:47 +00:00
|
|
|
|
2019-02-04 21:44:45 +00:00
|
|
|
target_compile_definitions(gnss_sdr_flags
|
2019-02-05 01:21:56 +00:00
|
|
|
PRIVATE -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
|
2019-02-04 21:44:45 +00:00
|
|
|
)
|
2019-02-03 18:24:44 +00:00
|
|
|
|
2019-02-21 08:59:06 +00:00
|
|
|
if(ENABLE_CLANG_TIDY)
|
|
|
|
if(CLANG_TIDY_EXE)
|
|
|
|
set_target_properties(gnss_sdr_flags
|
|
|
|
PROPERTIES
|
|
|
|
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-02-03 18:24:44 +00:00
|
|
|
set_property(TARGET gnss_sdr_flags
|
|
|
|
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
|
|
)
|