1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-03-13 15:08:16 +00:00

Improving detection of GNU Radio version so modules requiring >=3.7.4

will be built even without the presence of pkgconfig
This commit is contained in:
Carles Fernandez 2015-07-19 11:18:20 +02:00
parent 31ef3c7910
commit 334caa329e
3 changed files with 20 additions and 5 deletions

View File

@ -107,7 +107,6 @@ endfunction()
GR_MODULE(RUNTIME gnuradio-runtime gnuradio/top_block.h gnuradio-runtime)
GR_MODULE(ANALOG gnuradio-analog gnuradio/analog/api.h gnuradio-analog)
GR_MODULE(ATSC gnuradio-atsc gnuradio/atsc/api.h gnuradio-atsc)
GR_MODULE(AUDIO gnuradio-audio gnuradio/audio/api.h gnuradio-audio)
GR_MODULE(BLOCKS gnuradio-blocks gnuradio/blocks/api.h gnuradio-blocks)
GR_MODULE(CHANNELS gnuradio-channels gnuradio/channels/api.h gnuradio-channels)
@ -128,3 +127,19 @@ GR_MODULE(PMT gnuradio-runtime pmt/pmt.h gnuradio-pmt)
list(REMOVE_DUPLICATES GNURADIO_ALL_INCLUDE_DIRS)
list(REMOVE_DUPLICATES GNURADIO_ALL_LIBRARIES)
# Trick to find out that GNU Radio is >= 3.7.4 if pkgconfig is not present
if(NOT PC_GNURADIO_RUNTIME_VERSION)
find_file(GNURADIO_VERSION_GREATER_THAN_373
NAMES gnuradio/blocks/tsb_vector_sink_f.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_373)
set(PC_GNURADIO_RUNTIME_VERSION "3.7.4+")
endif(GNURADIO_VERSION_GREATER_THAN_373)
endif(NOT PC_GNURADIO_RUNTIME_VERSION)

View File

@ -139,9 +139,9 @@ set(SIGNAL_SOURCE_ADAPTER_SOURCES file_signal_source.cc
${OPT_DRIVER_SOURCES}
)
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.4)
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
set(SIGNAL_SOURCE_ADAPTER_SOURCES ${SIGNAL_SOURCE_ADAPTER_SOURCES} two_bit_cpx_file_signal_source.cc )
endif(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.4)
endif(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}

View File

@ -26,9 +26,9 @@ set(GNSS_RECEIVER_SOURCES
)
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.4)
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
add_definitions(-DMODERN_GNURADIO=1)
endif(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.4)
endif(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
include_directories(