2018-05-13 20:49:11 +00:00
|
|
|
# Copyright (C) 2012-2018 (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
|
|
|
#
|
|
|
|
|
2015-07-24 15:21:25 +00:00
|
|
|
|
2015-05-10 13:42:13 +00:00
|
|
|
set(GNSS_RECEIVER_SOURCES
|
|
|
|
control_thread.cc
|
|
|
|
control_message_factory.cc
|
|
|
|
file_configuration.cc
|
2012-12-24 02:33:50 +00:00
|
|
|
gnss_block_factory.cc
|
|
|
|
gnss_flowgraph.cc
|
|
|
|
in_memory_configuration.cc
|
|
|
|
)
|
2013-11-15 17:45:24 +00:00
|
|
|
|
2015-07-17 18:25:56 +00:00
|
|
|
|
2015-07-19 09:18:20 +00:00
|
|
|
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
|
2015-07-17 18:25:56 +00:00
|
|
|
add_definitions(-DMODERN_GNURADIO=1)
|
2015-07-19 09:18:20 +00:00
|
|
|
endif(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
|
2015-07-17 18:25:56 +00:00
|
|
|
|
2015-08-25 15:07:36 +00:00
|
|
|
if(ENABLE_CUDA)
|
|
|
|
add_definitions(-DCUDA_GPU_ACCEL=1)
|
|
|
|
set(OPT_RECEIVER_INCLUDE_DIRS ${OPT_RECEIVER_INCLUDE_DIRS} ${CUDA_INCLUDE_DIRS})
|
|
|
|
endif(ENABLE_CUDA)
|
|
|
|
|
2017-05-05 14:37:29 +00:00
|
|
|
if(ENABLE_FPGA)
|
|
|
|
add_definitions(-DENABLE_FPGA=1)
|
|
|
|
endif(ENABLE_FPGA)
|
|
|
|
|
2015-07-17 18:25:56 +00:00
|
|
|
|
2014-12-21 21:46:57 +00:00
|
|
|
if(Boost_VERSION LESS 105000)
|
|
|
|
add_definitions(-DOLD_BOOST=1)
|
|
|
|
endif(Boost_VERSION LESS 105000)
|
2012-12-24 02:33:50 +00:00
|
|
|
|
2015-10-27 19:18:48 +00:00
|
|
|
if(OPENSSL_FOUND)
|
|
|
|
add_definitions( -DUSE_OPENSSL_FALLBACK=1 )
|
|
|
|
endif(OPENSSL_FOUND)
|
|
|
|
|
Improving handling of optional processing blocks and linking libraries.
New options ENABLE_GN3S, ENABLE_RTLSDR, ENABLE_OPENCL, ENABLE_ARRAY and
ENABLE_GPERFTOOLS, all set by default to OFF. Users can enable that
features by 'cmake -DENABLE_XXX=ON ../ '. OpenCL is now not used by
default since it was giving problems in some platforms. Old variables
(RTSDR_DRIVER, GN3S_DRIVER, RAW_ARRAY_DRIVER and DISABLE_OPENCL) are
still honored and can be used in the same way, but the new ENABLE_XXX
are recommended for the sake of more uniform naming. Main CMakeFile.txt
has been rearranged, putting options first, then searching for the
required libraries, and then the optional ones. If Gperftools is enabled
and found, binaries are linked to the tcmalloc and profiler libraries,
and using the adequate flags. Fixed building in Mac OSX if Armadillo and
OpenBLAS were not installed in the system.
2014-08-07 19:04:01 +00:00
|
|
|
if(ENABLE_GN3S)
|
2013-07-13 10:35:52 +00:00
|
|
|
add_definitions(-DGN3S_DRIVER=1)
|
Improving handling of optional processing blocks and linking libraries.
New options ENABLE_GN3S, ENABLE_RTLSDR, ENABLE_OPENCL, ENABLE_ARRAY and
ENABLE_GPERFTOOLS, all set by default to OFF. Users can enable that
features by 'cmake -DENABLE_XXX=ON ../ '. OpenCL is now not used by
default since it was giving problems in some platforms. Old variables
(RTSDR_DRIVER, GN3S_DRIVER, RAW_ARRAY_DRIVER and DISABLE_OPENCL) are
still honored and can be used in the same way, but the new ENABLE_XXX
are recommended for the sake of more uniform naming. Main CMakeFile.txt
has been rearranged, putting options first, then searching for the
required libraries, and then the optional ones. If Gperftools is enabled
and found, binaries are linked to the tcmalloc and profiler libraries,
and using the adequate flags. Fixed building in Mac OSX if Armadillo and
OpenBLAS were not installed in the system.
2014-08-07 19:04:01 +00:00
|
|
|
endif(ENABLE_GN3S)
|
2014-02-18 19:40:44 +00:00
|
|
|
|
Improving handling of optional processing blocks and linking libraries.
New options ENABLE_GN3S, ENABLE_RTLSDR, ENABLE_OPENCL, ENABLE_ARRAY and
ENABLE_GPERFTOOLS, all set by default to OFF. Users can enable that
features by 'cmake -DENABLE_XXX=ON ../ '. OpenCL is now not used by
default since it was giving problems in some platforms. Old variables
(RTSDR_DRIVER, GN3S_DRIVER, RAW_ARRAY_DRIVER and DISABLE_OPENCL) are
still honored and can be used in the same way, but the new ENABLE_XXX
are recommended for the sake of more uniform naming. Main CMakeFile.txt
has been rearranged, putting options first, then searching for the
required libraries, and then the optional ones. If Gperftools is enabled
and found, binaries are linked to the tcmalloc and profiler libraries,
and using the adequate flags. Fixed building in Mac OSX if Armadillo and
OpenBLAS were not installed in the system.
2014-08-07 19:04:01 +00:00
|
|
|
if(ENABLE_ARRAY)
|
2014-02-17 18:53:45 +00:00
|
|
|
add_definitions(-DRAW_ARRAY_DRIVER=1)
|
Improving handling of optional processing blocks and linking libraries.
New options ENABLE_GN3S, ENABLE_RTLSDR, ENABLE_OPENCL, ENABLE_ARRAY and
ENABLE_GPERFTOOLS, all set by default to OFF. Users can enable that
features by 'cmake -DENABLE_XXX=ON ../ '. OpenCL is now not used by
default since it was giving problems in some platforms. Old variables
(RTSDR_DRIVER, GN3S_DRIVER, RAW_ARRAY_DRIVER and DISABLE_OPENCL) are
still honored and can be used in the same way, but the new ENABLE_XXX
are recommended for the sake of more uniform naming. Main CMakeFile.txt
has been rearranged, putting options first, then searching for the
required libraries, and then the optional ones. If Gperftools is enabled
and found, binaries are linked to the tcmalloc and profiler libraries,
and using the adequate flags. Fixed building in Mac OSX if Armadillo and
OpenBLAS were not installed in the system.
2014-08-07 19:04:01 +00:00
|
|
|
endif(ENABLE_ARRAY)
|
2014-02-18 19:40:44 +00:00
|
|
|
|
2015-03-03 17:07:26 +00:00
|
|
|
if(ENABLE_FLEXIBAND)
|
|
|
|
add_definitions(-DFLEXIBAND_DRIVER=1)
|
|
|
|
endif(ENABLE_FLEXIBAND)
|
|
|
|
|
2014-12-15 16:39:22 +00:00
|
|
|
if(ENABLE_OSMOSDR)
|
Improve portability
In some architectures (e.g. alpha, hppa, powerpcspe, m68k, sh4, sparc64, x32) the package gr-osmosdr is not available. So when the package is build with -DENABLE_OSMOSDR=ON, it breaks on the mentioned architectures. This is expected behaviour (it breaks because a required dependency is not found), but prevents from building the package on such architectures. This commit introduces a small change: when compilation is called with
cmake -DENABLE_OSMOSDR=ON -DENABLE_PACKAGING=ON ..
then, the compilation does not break if gr-osmosdr is not found.
This commit also fixes building when UHD is present but gnuradio-uhd is not (for instance, in hurd-i386)
2017-04-12 16:06:04 +00:00
|
|
|
if(GROSMOSDR_FOUND)
|
|
|
|
add_definitions(-DOSMOSDR_DRIVER=1)
|
|
|
|
endif(GROSMOSDR_FOUND)
|
2014-12-15 16:39:22 +00:00
|
|
|
endif(ENABLE_OSMOSDR)
|
2013-07-10 14:18:47 +00:00
|
|
|
|
Improve portability
In some architectures (e.g. alpha, hppa, powerpcspe, m68k, sh4, sparc64, x32) the package gr-osmosdr is not available. So when the package is build with -DENABLE_OSMOSDR=ON, it breaks on the mentioned architectures. This is expected behaviour (it breaks because a required dependency is not found), but prevents from building the package on such architectures. This commit introduces a small change: when compilation is called with
cmake -DENABLE_OSMOSDR=ON -DENABLE_PACKAGING=ON ..
then, the compilation does not break if gr-osmosdr is not found.
This commit also fixes building when UHD is present but gnuradio-uhd is not (for instance, in hurd-i386)
2017-04-12 16:06:04 +00:00
|
|
|
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
2014-11-14 20:42:22 +00:00
|
|
|
add_definitions(-DUHD_DRIVER=1)
|
Improve portability
In some architectures (e.g. alpha, hppa, powerpcspe, m68k, sh4, sparc64, x32) the package gr-osmosdr is not available. So when the package is build with -DENABLE_OSMOSDR=ON, it breaks on the mentioned architectures. This is expected behaviour (it breaks because a required dependency is not found), but prevents from building the package on such architectures. This commit introduces a small change: when compilation is called with
cmake -DENABLE_OSMOSDR=ON -DENABLE_PACKAGING=ON ..
then, the compilation does not break if gr-osmosdr is not found.
This commit also fixes building when UHD is present but gnuradio-uhd is not (for instance, in hurd-i386)
2017-04-12 16:06:04 +00:00
|
|
|
endif(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
2014-11-14 20:42:22 +00:00
|
|
|
|
2013-10-20 22:12:43 +00:00
|
|
|
#Enable OpenCL if found in the system
|
2014-03-15 01:21:17 +00:00
|
|
|
if(OPENCL_FOUND)
|
2013-12-10 20:17:57 +00:00
|
|
|
message(STATUS "Adding processing blocks implemented using OpenCL" )
|
2014-03-15 01:21:17 +00:00
|
|
|
add_definitions(-DOPENCL_BLOCKS=1)
|
|
|
|
else(OPENCL_FOUND)
|
|
|
|
add_definitions(-DOPENCL_BLOCKS=0)
|
|
|
|
endif(OPENCL_FOUND)
|
2013-10-20 22:12:43 +00:00
|
|
|
|
2017-10-29 05:51:22 +00:00
|
|
|
#enable SDR Hardware based on fmcomms2
|
|
|
|
if(ENABLE_PLUTOSDR)
|
|
|
|
add_definitions(-DPLUTOSDR_DRIVER=1)
|
2017-10-31 11:36:35 +00:00
|
|
|
set(OPT_RECEIVER_INCLUDE_DIRS ${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
|
2017-10-29 05:51:22 +00:00
|
|
|
endif(ENABLE_PLUTOSDR)
|
|
|
|
|
|
|
|
if(ENABLE_FMCOMMS2)
|
|
|
|
add_definitions(-DFMCOMMS2_DRIVER=1)
|
2017-10-31 11:36:35 +00:00
|
|
|
set(OPT_RECEIVER_INCLUDE_DIRS ${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
|
2017-10-29 05:51:22 +00:00
|
|
|
endif(ENABLE_FMCOMMS2)
|
|
|
|
|
2018-03-02 10:30:36 +00:00
|
|
|
if(ENABLE_AD9361)
|
|
|
|
add_definitions(-DAD9361_DRIVER=1)
|
|
|
|
set(OPT_RECEIVER_INCLUDE_DIRS ${OPT_RECEIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
|
|
|
|
endif(ENABLE_AD9361)
|
|
|
|
|
2018-03-28 06:35:33 +00:00
|
|
|
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.15" )
|
2018-02-01 14:15:03 +00:00
|
|
|
add_definitions( -DGR_GREATER_38=1 )
|
2018-03-28 06:35:33 +00:00
|
|
|
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.15" )
|
2018-02-01 14:15:03 +00:00
|
|
|
|
2017-10-31 11:36:35 +00:00
|
|
|
|
|
|
|
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/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}
|
|
|
|
${OPT_RECEIVER_INCLUDE_DIRS}
|
|
|
|
${VOLK_GNSSSDR_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
2014-06-28 01:55:57 +00:00
|
|
|
file(GLOB GNSS_RECEIVER_HEADERS "*.h")
|
2016-05-23 17:51:59 +00:00
|
|
|
list(SORT GNSS_RECEIVER_HEADERS)
|
2014-06-28 01:55:57 +00:00
|
|
|
file(GLOB GNSS_RECEIVER_INTERFACE_HEADERS "../interfaces/*.h")
|
2016-05-23 17:51:59 +00:00
|
|
|
list(SORT GNSS_RECEIVER_INTERFACE_HEADERS)
|
2014-06-28 01:55:57 +00:00
|
|
|
add_library(gnss_rx ${GNSS_RECEIVER_SOURCES} ${GNSS_RECEIVER_HEADERS} ${GNSS_RECEIVER_INTERFACE_HEADERS})
|
|
|
|
source_group(Headers FILES ${GNSS_RECEIVER_HEADERS} ${GNSS_RECEIVER_INTERFACE_HEADERS})
|
2013-11-15 17:45:24 +00:00
|
|
|
|
2015-05-10 13:42:13 +00:00
|
|
|
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
|
2017-03-23 14:45:41 +00:00
|
|
|
telemetry_decoder_libswiftcnav
|
|
|
|
telemetry_decoder_lib
|
2015-05-10 13:42:13 +00:00
|
|
|
telemetry_decoder_adapters
|
|
|
|
obs_adapters
|
|
|
|
pvt_adapters
|
|
|
|
pvt_lib
|
2013-11-15 17:45:24 +00:00
|
|
|
rx_core_lib
|
|
|
|
)
|