1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-26 00:46:59 +00:00

Fix compilation

This commit is contained in:
Carles Fernandez 2017-10-31 12:45:09 +01:00
parent e7143f932a
commit 0054f1c5f8
3 changed files with 34 additions and 2 deletions

View File

@ -0,0 +1,32 @@
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_IIO gnuradio-iio)
FIND_PATH(
IIO_INCLUDE_DIRS
NAMES iio/api.h
HINTS $ENV{IIO_DIR}/include
${PC_IIO_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include
/usr/local/include
/usr/include
${CMAKE_INSTALL_PREFIX}/include/gnuradio
/usr/local/include/gnuradio
/usr/include/gnuradio
)
FIND_LIBRARY(
IIO_LIBRARIES
NAMES gnuradio-iio
HINTS $ENV{IIO_DIR}/lib
${PC_IIO_LIBDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
/usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IIO DEFAULT_MSG IIO_LIBRARIES IIO_INCLUDE_DIRS)
MARK_AS_ADVANCED(IIO_LIBRARIES IIO_INCLUDE_DIRS)

View File

@ -47,7 +47,7 @@ if(ENABLE_FMCOMMS2)
else(NOT IIO_FOUND)
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${IIO_LIBRARIES})
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${IIO_INCLUDE_DIRS})
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc plutosdr_signal_source.cc)
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc)
endif(NOT IIO_FOUND)
endif(ENABLE_FMCOMMS2)

View File

@ -51,7 +51,7 @@ PlutosdrSignalSource::PlutosdrSignalSource(ConfigurationInterface* configuration
std::string default_dump_file = "./data/signal_source.dat";
uri_ = configuration->property(role + ".device_address", std::string("192.168.2.1"));
freq_ = configuration->property(role + ".freq", GPS_L1_FREQ_HZ);
sample_rate_ configuration->property(role + ".sampling_frequency", 3000000);
sample_rate_ = configuration->property(role + ".sampling_frequency", 3000000);
bandwidth_ = configuration->property(role + ".bandwidth", 2000000);
buffer_size_ = configuration->property(role + ".buffer_size", 0xA0000);
decimation_ = configuration->property(role + ".decimation", 1);