[hamradio-commits] [gnss-sdr] 212/251: Improving detection of GNU Radio version so modules requiring >=3.7.4 will be built even without the presence of pkgconfig

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Wed Sep 2 00:22:53 UTC 2015


This is an automated email from the git hooks/post-receive script.

carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.

commit 334caa329ed9e277aabc9098f3e6c2e666c7aaaf
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Sun Jul 19 11:18:20 2015 +0200

    Improving detection of GNU Radio version so modules requiring >=3.7.4
    will be built even without the presence of pkgconfig
---
 cmake/Modules/FindGnuradio.cmake                     | 17 ++++++++++++++++-
 src/algorithms/signal_source/adapters/CMakeLists.txt |  4 ++--
 src/core/receiver/CMakeLists.txt                     |  4 ++--
 3 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/cmake/Modules/FindGnuradio.cmake b/cmake/Modules/FindGnuradio.cmake
index 46f6c2f..c89f2b3 100644
--- a/cmake/Modules/FindGnuradio.cmake
+++ b/cmake/Modules/FindGnuradio.cmake
@@ -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)
\ No newline at end of file
diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt
index 2cba96e..14284f6 100644
--- a/src/algorithms/signal_source/adapters/CMakeLists.txt
+++ b/src/algorithms/signal_source/adapters/CMakeLists.txt
@@ -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}
diff --git a/src/core/receiver/CMakeLists.txt b/src/core/receiver/CMakeLists.txt
index b568648..cea34bb 100644
--- a/src/core/receiver/CMakeLists.txt
+++ b/src/core/receiver/CMakeLists.txt
@@ -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(

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git



More information about the pkg-hamradio-commits mailing list