mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-26 00:46:59 +00:00
Fix compilation in GNU Radio 3.8
This commit is contained in:
parent
c9178e0d63
commit
149ceaa366
@ -5,7 +5,7 @@
|
||||
INCLUDE(FindPkgConfig)
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
||||
# if GR_REQUIRED_COMPONENTS is not defined, it will be set to the following list
|
||||
# if GR_REQUIRED_COMPONENTS is not defined, it will be set to the following list
|
||||
if(NOT GR_REQUIRED_COMPONENTS)
|
||||
set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS DIGITAL FFT FILTER PMT FEC TRELLIS UHD)
|
||||
endif()
|
||||
@ -164,4 +164,17 @@ if(NOT PC_GNURADIO_RUNTIME_VERSION)
|
||||
if(GNURADIO_VERSION_GREATER_THAN_373)
|
||||
set(PC_GNURADIO_RUNTIME_VERSION "3.7.4+")
|
||||
endif(GNURADIO_VERSION_GREATER_THAN_373)
|
||||
endif(NOT PC_GNURADIO_RUNTIME_VERSION)
|
||||
|
||||
find_file(GNURADIO_VERSION_GREATER_THAN_38
|
||||
NAMES gnuradio/filter/mmse_resampler_cc.h
|
||||
HINTS $ENV{GNURADIO_RUNTIME_DIR}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${GNURADIO_INSTALL_PREFIX}/include
|
||||
PATHS /usr/local/include
|
||||
/usr/include
|
||||
${GNURADIO_INSTALL_PREFIX}/include
|
||||
)
|
||||
if(GNURADIO_VERSION_GREATER_THAN_38)
|
||||
set(PC_GNURADIO_RUNTIME_VERSION "3.8.0+")
|
||||
endif(GNURADIO_VERSION_GREATER_THAN_38)
|
||||
endif(NOT PC_GNURADIO_RUNTIME_VERSION)
|
||||
|
@ -16,7 +16,7 @@
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
set(RESAMPLER_ADAPTER_SOURCES
|
||||
set(RESAMPLER_ADAPTER_SOURCES
|
||||
direct_resampler_conditioner.cc
|
||||
fractional_resampler_conditioner.cc
|
||||
)
|
||||
@ -31,6 +31,12 @@ include_directories(
|
||||
${VOLK_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
||||
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.11" )
|
||||
add_definitions( -DGR_GREATER_38=1 )
|
||||
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.11" )
|
||||
|
||||
|
||||
file(GLOB RESAMPLER_ADAPTER_HEADERS "*.h")
|
||||
list(SORT RESAMPLER_ADAPTER_HEADERS)
|
||||
add_library(resampler_adapters ${RESAMPLER_ADAPTER_SOURCES} ${RESAMPLER_ADAPTER_HEADERS})
|
||||
|
@ -65,7 +65,11 @@ FractionalResamplerConditioner::FractionalResamplerConditioner(
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
#ifdef GR_GREATER_38
|
||||
resampler_ = gr::filter::mmse_resampler_cc::make(0.0, sample_freq_in_ / sample_freq_out_);
|
||||
#else
|
||||
resampler_ = gr::filter::fractional_resampler_cc::make(0.0, sample_freq_in_ / sample_freq_out_);
|
||||
#endif
|
||||
DLOG(INFO) << "sample_freq_in " << sample_freq_in_;
|
||||
DLOG(INFO) << "sample_freq_out" << sample_freq_out_;
|
||||
DLOG(INFO) << "Item size " << item_size_;
|
||||
|
@ -92,6 +92,10 @@ endif(ENABLE_FMCOMMS2)
|
||||
|
||||
add_definitions(-DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.11" )
|
||||
add_definitions( -DGR_GREATER_38=1 )
|
||||
endif(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.11" )
|
||||
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
Loading…
Reference in New Issue
Block a user