From fd56ae76403097a7a8d246d2467b8a5a2912b8df Mon Sep 17 00:00:00 2001 From: Dimitri Stolnikov Date: Sun, 17 Mar 2013 10:38:20 +0100 Subject: [PATCH] adopt gnuradio component header structure this makes it neccessary to include headers with the osmosdr/ prefix thanks to Alexandru Csete for pointing this out. --- CMakeLists.txt | 2 +- cmake/Modules/FindGnuradioAudio.cmake | 8 ++++---- cmake/Modules/FindGnuradioCore.cmake | 2 +- gnuradio-osmosdr.pc.in | 2 +- include/osmosdr/osmosdr_device.h | 4 ++-- include/osmosdr/osmosdr_ranges.h | 4 ++-- include/osmosdr/osmosdr_sink_c.h | 4 ++-- include/osmosdr/osmosdr_source_c.h | 6 +++--- lib/osmosdr_device.cc | 2 +- lib/osmosdr_ranges.cc | 2 +- lib/osmosdr_sink_c_impl.h | 2 +- lib/osmosdr_source_c_impl.h | 2 +- lib/osmosdr_src_iface.h | 2 +- swig/osmosdr_swig.i | 16 ++++++++-------- 14 files changed, 29 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60e0bf4..a9334c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,7 +129,7 @@ endif() # Setup the include and linker paths ######################################################################## include_directories( - ${CMAKE_SOURCE_DIR}/include/osmosdr + ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/lib ${Boost_INCLUDE_DIRS} ${GRUEL_INCLUDE_DIRS} diff --git a/cmake/Modules/FindGnuradioAudio.cmake b/cmake/Modules/FindGnuradioAudio.cmake index 63207f5..246568f 100644 --- a/cmake/Modules/FindGnuradioAudio.cmake +++ b/cmake/Modules/FindGnuradioAudio.cmake @@ -3,11 +3,11 @@ PKG_CHECK_MODULES(PC_GNURADIO_AUDIO gnuradio-audio) FIND_PATH( GNURADIO_AUDIO_INCLUDE_DIRS - NAMES gr_audio_api.h - HINTS $ENV{GNURADIO_AUDIO_DIR}/include/gnuradio + NAMES gnuradio/gr_audio_api.h + HINTS $ENV{GNURADIO_AUDIO_DIR}/include ${PC_GNURADIO_AUDIO_INCLUDEDIR} - PATHS /usr/local/include/gnuradio - /usr/include/gnuradio + PATHS /usr/local/include + /usr/include ) FIND_LIBRARY( diff --git a/cmake/Modules/FindGnuradioCore.cmake b/cmake/Modules/FindGnuradioCore.cmake index 44f351d..6b4386e 100644 --- a/cmake/Modules/FindGnuradioCore.cmake +++ b/cmake/Modules/FindGnuradioCore.cmake @@ -3,7 +3,7 @@ PKG_CHECK_MODULES(PC_GNURADIO_CORE gnuradio-core) FIND_PATH( GNURADIO_CORE_INCLUDE_DIRS - NAMES gr_random.h + NAMES gr_core_api.h HINTS $ENV{GNURADIO_CORE_DIR}/include/gnuradio ${PC_GNURADIO_CORE_INCLUDEDIR} ${CMAKE_INSTALL_PREFIX}/include/gnuradio diff --git a/gnuradio-osmosdr.pc.in b/gnuradio-osmosdr.pc.in index ea6f53c..2cdfc28 100644 --- a/gnuradio-osmosdr.pc.in +++ b/gnuradio-osmosdr.pc.in @@ -1,7 +1,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} libdir=${exec_prefix}/@GR_LIBRARY_DIR@ -includedir=${prefix}/@GR_INCLUDE_DIR@/osmosdr +includedir=${prefix}/@GR_INCLUDE_DIR@ Name: @CPACK_PACKAGE_NAME@ Description: @CPACK_PACKAGE_DESCRIPTION_SUMMARY@ diff --git a/include/osmosdr/osmosdr_device.h b/include/osmosdr/osmosdr_device.h index ed9d01f..1f59751 100644 --- a/include/osmosdr/osmosdr_device.h +++ b/include/osmosdr/osmosdr_device.h @@ -21,8 +21,8 @@ #ifndef INCLUDED_OSMOSDR_DEVICE_H #define INCLUDED_OSMOSDR_DEVICE_H -#include -#include +#include +#include #include #include #include diff --git a/include/osmosdr/osmosdr_ranges.h b/include/osmosdr/osmosdr_ranges.h index c84eb95..e085661 100644 --- a/include/osmosdr/osmosdr_ranges.h +++ b/include/osmosdr/osmosdr_ranges.h @@ -18,8 +18,8 @@ #ifndef INCLUDED_OSMOSDR_RANGES_H #define INCLUDED_OSMOSDR_RANGES_H -#include -#include +#include +#include #include #include diff --git a/include/osmosdr/osmosdr_sink_c.h b/include/osmosdr/osmosdr_sink_c.h index 19ac05e..ebdd489 100644 --- a/include/osmosdr/osmosdr_sink_c.h +++ b/include/osmosdr/osmosdr_sink_c.h @@ -20,8 +20,8 @@ #ifndef INCLUDED_OSMOSDR_SINK_C_H #define INCLUDED_OSMOSDR_SINK_C_H -#include -#include +#include +#include class osmosdr_sink_c; diff --git a/include/osmosdr/osmosdr_source_c.h b/include/osmosdr/osmosdr_source_c.h index a2b598c..453f592 100644 --- a/include/osmosdr/osmosdr_source_c.h +++ b/include/osmosdr/osmosdr_source_c.h @@ -20,9 +20,9 @@ #ifndef INCLUDED_OSMOSDR_SOURCE_C_H #define INCLUDED_OSMOSDR_SOURCE_C_H -#include -#include -#include +#include +#include +#include class osmosdr_source_c; diff --git a/lib/osmosdr_device.cc b/lib/osmosdr_device.cc index 3043645..12f126f 100644 --- a/lib/osmosdr_device.cc +++ b/lib/osmosdr_device.cc @@ -18,7 +18,7 @@ * Boston, MA 02110-1301, USA. */ -#include +#include #include #include #include diff --git a/lib/osmosdr_ranges.cc b/lib/osmosdr_ranges.cc index c018c29..a8e589d 100644 --- a/lib/osmosdr_ranges.cc +++ b/lib/osmosdr_ranges.cc @@ -15,7 +15,7 @@ // along with this program. If not, see . // -#include +#include #include #include #include diff --git a/lib/osmosdr_sink_c_impl.h b/lib/osmosdr_sink_c_impl.h index c687124..49457d0 100644 --- a/lib/osmosdr_sink_c_impl.h +++ b/lib/osmosdr_sink_c_impl.h @@ -20,7 +20,7 @@ #ifndef INCLUDED_OSMOSDR_SINK_C_IMPL_H #define INCLUDED_OSMOSDR_SINK_C_IMPL_H -#include +#include class osmosdr_sink_c_impl : public osmosdr_sink_c { diff --git a/lib/osmosdr_source_c_impl.h b/lib/osmosdr_source_c_impl.h index 47d6695..292ca90 100644 --- a/lib/osmosdr_source_c_impl.h +++ b/lib/osmosdr_source_c_impl.h @@ -20,7 +20,7 @@ #ifndef INCLUDED_OSMOSDR_SOURCE_C_IMPL_H #define INCLUDED_OSMOSDR_SOURCE_C_IMPL_H -#include +#include #ifdef HAVE_IQBALANCE #include diff --git a/lib/osmosdr_src_iface.h b/lib/osmosdr_src_iface.h index 3c0f831..8169b3a 100644 --- a/lib/osmosdr_src_iface.h +++ b/lib/osmosdr_src_iface.h @@ -21,7 +21,7 @@ #ifndef OSMOSDR_SRC_IFACE_H #define OSMOSDR_SRC_IFACE_H -#include +#include #include class osmosdr_src_iface; diff --git a/swig/osmosdr_swig.i b/swig/osmosdr_swig.i index 6e19297..b37752f 100644 --- a/swig/osmosdr_swig.i +++ b/swig/osmosdr_swig.i @@ -11,31 +11,31 @@ %include "osmosdr_swig_doc.i" %{ -#include "osmosdr_device.h" -#include "osmosdr_source_c.h" -//#include "osmosdr_sink_c.h" +#include "osmosdr/osmosdr_device.h" +#include "osmosdr/osmosdr_source_c.h" +//#include "osmosdr/osmosdr_sink_c.h" %} %template(string_vector_t) std::vector; //%template(size_vector_t) std::vector; -%include +%include %ignore osmosdr::device_t::operator[]; //ignore warnings about %extend %template(string_string_dict_t) std::map; //define before device %template(devices_t) std::vector; -%include +%include %template(range_vector_t) std::vector; //define before range -%include +%include GR_SWIG_BLOCK_MAGIC(osmosdr,source_c); -%include "osmosdr_source_c.h" +%include "osmosdr/osmosdr_source_c.h" //GR_SWIG_BLOCK_MAGIC(osmosdr,sink_c); -//%include "osmosdr_sink_c.h" +//%include "osmosdr/osmosdr_sink_c.h" #if SWIGGUILE %scheme %{