diff --git a/CMakeLists.txt b/CMakeLists.txt
index 42014d5..a251954 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,22 +1,23 @@
-# Copyright 2011 Free Software Foundation, Inc.
-#
+# Copyright 2011,2012 Free Software Foundation, Inc.
+#
# This file is part of GNU Radio
-#
+#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
-#
+#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
+
########################################################################
# Project setup
########################################################################
@@ -44,9 +45,9 @@ endif()
########################################################################
# Find boost
########################################################################
-if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
+if(UNIX AND EXISTS "/usr/lib64")
list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
-endif(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
+endif(UNIX AND EXISTS "/usr/lib64")
set(Boost_ADDITIONAL_VERSIONS
"1.35.0" "1.35" "1.36.0" "1.36" "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39"
"1.40.0" "1.40" "1.41.0" "1.41" "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44"
@@ -56,7 +57,7 @@ set(Boost_ADDITIONAL_VERSIONS
"1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64"
"1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69"
)
-find_package(Boost "1.35")
+find_package(Boost "1.35" COMPONENTS system)
if(NOT Boost_FOUND)
message(FATAL_ERROR "Boost required to compile iqbalance")
@@ -107,15 +108,10 @@ set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks)
########################################################################
# Find gnuradio build dependencies
########################################################################
-find_package(Gruel)
-find_package(GnuradioCore)
-
-if(NOT GRUEL_FOUND)
- message(FATAL_ERROR "Gruel required to compile iqbalance")
-endif()
-
-if(NOT GNURADIO_CORE_FOUND)
- message(FATAL_ERROR "GnuRadio Core required to compile iqbalance")
+set(GR_REQUIRED_COMPONENTS RUNTIME)
+find_package(Gnuradio "3.7.0")
+if(NOT GNURADIO_RUNTIME_FOUND)
+ message(FATAL_ERROR "GnuRadio Runtime required to compile iqbalance")
endif()
########################################################################
@@ -126,16 +122,14 @@ include_directories(
${Boost_INCLUDE_DIRS}
${FFTW3F_INCLUDE_DIRS}
${LIBOSMODSP_INCLUDE_DIRS}
- ${GRUEL_INCLUDE_DIRS}
- ${GNURADIO_CORE_INCLUDE_DIRS}
+ ${GNURADIO_RUNTIME_INCLUDE_DIRS}
)
link_directories(
${Boost_LIBRARY_DIRS}
${FFTW3F_LIBRARY_DIRS}
${LIBOSMODSP_LIBRARY_DIRS}
- ${GRUEL_LIBRARY_DIRS}
- ${GNURADIO_CORE_LIBRARY_DIRS}
+ ${GNURADIO_RUNTIME_LIBRARY_DIRS}
)
# Set component parameters
@@ -157,7 +151,7 @@ add_custom_target(uninstall
########################################################################
# Add subdirectories
########################################################################
-add_subdirectory(include)
+add_subdirectory(include/gnuradio/iqbalance)
add_subdirectory(lib)
add_subdirectory(swig)
add_subdirectory(python)
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt
index b149b68..31f74ec 100644
--- a/grc/CMakeLists.txt
+++ b/grc/CMakeLists.txt
@@ -18,5 +18,6 @@
# Boston, MA 02110-1301, USA.
install(FILES
iqbalance_fix_cc.xml
- iqbalance_optimize_c.xml DESTINATION share/gnuradio/grc/blocks
+ iqbalance_optimize_c.xml
+ DESTINATION share/gnuradio/grc/blocks
)
diff --git a/grc/iqbalance_fix_cc.xml b/grc/iqbalance_fix_cc.xml
index 2fc32d0..34364d8 100644
--- a/grc/iqbalance_fix_cc.xml
+++ b/grc/iqbalance_fix_cc.xml
@@ -3,7 +3,7 @@
IQ Bal Fix
iqbalance_fix_cc
IQ Balance
- import iqbalance
+ from gnuradio import iqbalance
iqbalance.fix_cc($mag, $phase)
set_mag($mag)
set_phase($phase)
diff --git a/grc/iqbalance_optimize_c.xml b/grc/iqbalance_optimize_c.xml
index 99b439a..cb42d98 100644
--- a/grc/iqbalance_optimize_c.xml
+++ b/grc/iqbalance_optimize_c.xml
@@ -3,7 +3,7 @@
IQ Bal Optimize
iqbalance_optimize_c
IQ Balance
- import iqbalance
+ from gnuradio import iqbalance
iqbalance.optimize_c($period)
set_period($period)
diff --git a/include/CMakeLists.txt b/include/gnuradio/iqbalance/CMakeLists.txt
similarity index 86%
rename from include/CMakeLists.txt
rename to include/gnuradio/iqbalance/CMakeLists.txt
index 6dcb4a6..f3c4441 100644
--- a/include/CMakeLists.txt
+++ b/include/gnuradio/iqbalance/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -21,7 +21,8 @@
# Install public header files
########################################################################
install(FILES
- iqbalance_api.h
- iqbalance_fix_cc.h
- iqbalance_optimize_c.h DESTINATION include/iqbalance
+ api.h
+ fix_cc.h
+ optimize_c.h
+ DESTINATION include/gnuradio/iqbalance
)
diff --git a/include/iqbalance_api.h b/include/gnuradio/iqbalance/api.h
similarity index 96%
rename from include/iqbalance_api.h
rename to include/gnuradio/iqbalance/api.h
index f225399..6a25660 100644
--- a/include/iqbalance_api.h
+++ b/include/gnuradio/iqbalance/api.h
@@ -22,7 +22,7 @@
#ifndef INCLUDED_IQBALANCE_API_H
#define INCLUDED_IQBALANCE_API_H
-#include
+#include
#ifdef gnuradio_iqbalance_EXPORTS
# define IQBALANCE_API __GR_ATTR_EXPORT
diff --git a/include/gnuradio/iqbalance/fix_cc.h b/include/gnuradio/iqbalance/fix_cc.h
new file mode 100644
index 0000000..30f4e3b
--- /dev/null
+++ b/include/gnuradio/iqbalance/fix_cc.h
@@ -0,0 +1,62 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013 Sylvain Munaut
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef INCLUDED_IQBALANCE_FIX_CC_H
+#define INCLUDED_IQBALANCE_FIX_CC_H
+
+#include
+#include
+
+namespace gr {
+ namespace iqbalance {
+
+ class IQBALANCE_API fix_cc : public gr::sync_block
+ {
+ private:
+ fix_cc(float mag, float phase);
+
+ float d_mag, d_phase;
+
+ public:
+ typedef boost::shared_ptr sptr;
+
+ static sptr make(float mag=0.0f, float phase=0.0f);
+
+ ~fix_cc();
+
+ void set_mag(float mag) { this->d_mag = mag; }
+ void set_phase(float phase) { this->d_phase = phase; }
+
+ float mag() const { return this->d_mag; }
+ float phase() const { return this->d_phase; }
+
+ void apply_new_corrections (pmt::pmt_t msg);
+
+ int work (int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace iqbalance
+} // namespace gr
+
+#endif /* INCLUDED_IQBALANCE_FIX_CC_H */
+
diff --git a/include/gnuradio/iqbalance/optimize_c.h b/include/gnuradio/iqbalance/optimize_c.h
new file mode 100644
index 0000000..ed97c07
--- /dev/null
+++ b/include/gnuradio/iqbalance/optimize_c.h
@@ -0,0 +1,70 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013 Sylvain Munaut
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef INCLUDED_IQBALANCE_OPTIMIZE_C_H
+#define INCLUDED_IQBALANCE_OPTIMIZE_C_H
+
+#include
+#include
+
+namespace gr {
+ namespace iqbalance {
+
+ class IQBALANCE_API optimize_c : public gr::sync_block
+ {
+ private:
+ optimize_c(int period);
+
+ int d_period, d_count;
+ bool d_first;
+ float d_mag, d_phase;
+
+ public:
+ typedef boost::shared_ptr sptr;
+
+ static sptr make(int period=0);
+
+ ~optimize_c();
+
+ void set_period(int period) { this->d_period = period; }
+ int period() const { return this->d_period; }
+
+ float mag() const { return this->d_mag; }
+ float phase() const { return this->d_phase; }
+
+ void reset(void) {
+ this->d_first = true;
+ this->d_count = 0;
+ this->d_mag = this->d_phase = 0.0f;
+ }
+
+ void forecast (int noutput_items, gr_vector_int &ninput_items_required);
+
+ int work (int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace iqbalance
+} // namespace gr
+
+#endif /* INCLUDED_IQBALANCE_OPTIMIZE_C_H */
+
diff --git a/include/iqbalance_fix_cc.h b/include/iqbalance_fix_cc.h
deleted file mode 100644
index 519b740..0000000
--- a/include/iqbalance_fix_cc.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2013 Sylvain Munaut
- *
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this software; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#ifndef INCLUDED_IQBALANCE_FIX_CC_H
-#define INCLUDED_IQBALANCE_FIX_CC_H
-
-#include
-#include
-
-class iqbalance_fix_cc;
-
-typedef boost::shared_ptr iqbalance_fix_cc_sptr;
-
-IQBALANCE_API iqbalance_fix_cc_sptr iqbalance_make_fix_cc (float mag=0.0f, float phase=0.0f);
-
-/*!
- * \brief <+description+>
- * \ingroup block
- *
- */
-class IQBALANCE_API iqbalance_fix_cc : public gr_sync_block
-{
- private:
- friend IQBALANCE_API iqbalance_fix_cc_sptr iqbalance_make_fix_cc (float mag, float phase);
-
- iqbalance_fix_cc(float mag, float phase);
-
- float d_mag, d_phase;
-
- public:
- ~iqbalance_fix_cc();
-
- void set_mag(float mag) { this->d_mag = mag; }
- void set_phase(float phase) { this->d_phase = phase; }
-
- float mag() const { return this->d_mag; }
- float phase() const { return this->d_phase; }
-
- void apply_new_corrections (pmt::pmt_t msg);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif /* INCLUDED_IQBALANCE_FIX_CC_H */
-
diff --git a/include/iqbalance_optimize_c.h b/include/iqbalance_optimize_c.h
deleted file mode 100644
index bbdfea1..0000000
--- a/include/iqbalance_optimize_c.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2013 Sylvain Munaut
- *
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this software; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#ifndef INCLUDED_IQBALANCE_OPTIMIZE_C_H
-#define INCLUDED_IQBALANCE_OPTIMIZE_C_H
-
-#include
-#include
-
-class iqbalance_optimize_c;
-
-typedef boost::shared_ptr iqbalance_optimize_c_sptr;
-
-IQBALANCE_API iqbalance_optimize_c_sptr iqbalance_make_optimize_c (int period=0);
-
-/*!
- * \brief <+description+>
- * \ingroup block
- *
- */
-class IQBALANCE_API iqbalance_optimize_c : public gr_sync_block
-{
- private:
- friend IQBALANCE_API iqbalance_optimize_c_sptr iqbalance_make_optimize_c (int period);
-
- iqbalance_optimize_c(int period);
-
- int d_period, d_count;
- bool d_first;
- float d_mag, d_phase;
-
- public:
- ~iqbalance_optimize_c();
-
- void set_period(int period) { this->d_period = period; }
- int period() const { return this->d_period; }
-
- float mag() const { return this->d_mag; }
- float phase() const { return this->d_phase; }
-
- void reset(void) {
- this->d_first = true;
- this->d_count = 0;
- this->d_mag = this->d_phase = 0.0f;
- }
-
- void forecast (int noutput_items, gr_vector_int &ninput_items_required);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif /* INCLUDED_IQBALANCE_OPTIMIZE_C_H */
-
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 207cf76..9b7e349 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -19,8 +19,17 @@
# Setup library
########################################################################
include(GrPlatform) #define LIB_SUFFIX
-add_library(gnuradio-iqbalance SHARED iqbalance_fix_cc.cc iqbalance_optimize_c.cc ${LIBOSMODSP_SOURCES})
-target_link_libraries(gnuradio-iqbalance ${Boost_LIBRARIES} ${GRUEL_LIBRARIES} ${GNURADIO_CORE_LIBRARIES} ${LIBOSMODSP_LIBRARIES})
+
+include_directories(${Boost_INCLUDE_DIR})
+link_directories(${Boost_LIBRARY_DIRS})
+
+list(APPEND iqbalance_sources
+ fix_cc.cc
+ optimize_c.cc
+)
+
+add_library(gnuradio-iqbalance SHARED ${iqbalance_sources} ${LIBOSMODSP_SOURCES})
+target_link_libraries(gnuradio-iqbalance ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${LIBOSMODSP_LIBRARIES})
set_target_properties(gnuradio-iqbalance PROPERTIES DEFINE_SYMBOL "gnuradio_iqbalance_EXPORTS")
########################################################################
diff --git a/lib/iqbalance_fix_cc.cc b/lib/fix_cc.cc
similarity index 68%
rename from lib/iqbalance_fix_cc.cc
rename to lib/fix_cc.cc
index cecdf09..630dad7 100644
--- a/lib/iqbalance_fix_cc.cc
+++ b/lib/fix_cc.cc
@@ -22,49 +22,50 @@
#include "config.h"
#endif
-#include
-#include "iqbalance_fix_cc.h"
+#include
+#include
+namespace gr {
-iqbalance_fix_cc_sptr
-iqbalance_make_fix_cc (float mag, float phase)
+iqbalance::fix_cc::sptr
+iqbalance::fix_cc::make(float mag, float phase)
{
- return gnuradio::get_initial_sptr (new iqbalance_fix_cc(mag, phase));
+ return gnuradio::get_initial_sptr(new iqbalance::fix_cc(mag, phase));
}
-iqbalance_fix_cc::iqbalance_fix_cc (float mag, float phase)
- : gr_sync_block ("fix_cc",
- gr_make_io_signature(1, 1, sizeof (gr_complex)),
- gr_make_io_signature(1, 1, sizeof (gr_complex))),
+iqbalance::fix_cc::fix_cc(float mag, float phase)
+ : gr::sync_block ("fix_cc",
+ gr::io_signature::make(1, 1, sizeof (gr_complex)),
+ gr::io_signature::make(1, 1, sizeof (gr_complex))),
d_mag(mag),
d_phase(phase)
{
message_port_register_in(pmt::mp("iqbal_corr"));
set_msg_handler(pmt::mp("iqbal_corr"),
- boost::bind(&iqbalance_fix_cc::apply_new_corrections, this, _1));
+ boost::bind(&iqbalance::fix_cc::apply_new_corrections, this, _1));
}
-iqbalance_fix_cc::~iqbalance_fix_cc()
+iqbalance::fix_cc::~fix_cc()
{
/* Nothing to do */
}
void
-iqbalance_fix_cc::apply_new_corrections (pmt::pmt_t msg)
+iqbalance::fix_cc::apply_new_corrections(pmt::pmt_t msg)
{
- if (!pmt_is_f32vector(msg))
+ if (!pmt::is_f32vector(msg))
return;
- this->set_mag(pmt_f32vector_ref(msg, 0));
- this->set_phase(pmt_f32vector_ref(msg, 1));
+ this->set_mag(pmt::f32vector_ref(msg, 0));
+ this->set_phase(pmt::f32vector_ref(msg, 1));
}
int
-iqbalance_fix_cc::work (int noutput_items,
+iqbalance::fix_cc::work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
@@ -90,3 +91,6 @@ iqbalance_fix_cc::work (int noutput_items,
return noutput_items;
}
+
+} /* namespace gr */
+
diff --git a/lib/iqbalance_optimize_c.cc b/lib/optimize_c.cc
similarity index 80%
rename from lib/iqbalance_optimize_c.cc
rename to lib/optimize_c.cc
index f229148..318a996 100644
--- a/lib/iqbalance_optimize_c.cc
+++ b/lib/optimize_c.cc
@@ -22,8 +22,8 @@
#include "config.h"
#endif
-#include
-#include "iqbalance_optimize_c.h"
+#include
+#include
extern "C" {
#include
@@ -34,30 +34,32 @@ extern "C" {
#define FFT_COUNT 4
-iqbalance_optimize_c_sptr
-iqbalance_make_optimize_c (int period)
+namespace gr {
+
+iqbalance::optimize_c::sptr
+iqbalance::optimize_c::make(int period)
{
- return gnuradio::get_initial_sptr (new iqbalance_optimize_c(period));
+ return gnuradio::get_initial_sptr (new iqbalance::optimize_c(period));
}
-iqbalance_optimize_c::iqbalance_optimize_c (int period)
- : gr_sync_block ("optimize_c",
- gr_make_io_signature(1, 1, sizeof (gr_complex)),
- gr_make_io_signature(0, 0, 0)),
+iqbalance::optimize_c::optimize_c(int period)
+ : gr::sync_block ("optimize_c",
+ gr::io_signature::make(1, 1, sizeof (gr_complex)),
+ gr::io_signature::make(0, 0, 0)),
d_period(period), d_count(0), d_first(true), d_mag(0.0f), d_phase(0.0f)
{
message_port_register_out(pmt::mp("iqbal_corr"));
}
-iqbalance_optimize_c::~iqbalance_optimize_c()
+iqbalance::optimize_c::~optimize_c()
{
/* Nothing to do */
}
void
-iqbalance_optimize_c::forecast (int noutput_items, gr_vector_int &ninput_items_required)
+iqbalance::optimize_c::forecast(int noutput_items, gr_vector_int &ninput_items_required)
{
unsigned ninputs = ninput_items_required.size ();
for (unsigned i = 0; i < ninputs; i++)
@@ -66,7 +68,7 @@ iqbalance_optimize_c::forecast (int noutput_items, gr_vector_int &ninput_items_r
int
-iqbalance_optimize_c::work(int noutput_items,
+iqbalance::optimize_c::work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
@@ -121,8 +123,11 @@ iqbalance_optimize_c::work(int noutput_items,
p[0] = this->d_mag;
p[1] = this->d_phase;
- pmt::pmt_t msg = pmt::pmt_init_f32vector(2, p);
+ pmt::pmt_t msg = pmt::init_f32vector(2, p);
message_port_pub(pmt::mp("iqbal_corr"), msg);
return N;
}
+
+} /* namespace gr */
+
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 5c55e2e..0963763 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -31,7 +31,7 @@ endif()
GR_PYTHON_INSTALL(
FILES
__init__.py
- DESTINATION ${GR_PYTHON_DIR}/iqbalance
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/iqbalance
)
########################################################################
diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt
index 0a439bc..23800fc 100644
--- a/swig/CMakeLists.txt
+++ b/swig/CMakeLists.txt
@@ -18,7 +18,7 @@
# Boston, MA 02110-1301, USA.
########################################################################
-# Include swig generation macros
+# Setup swig generation
########################################################################
find_package(SWIG)
find_package(PythonLibs)
@@ -28,34 +28,23 @@ endif()
include(GrSwig)
include(GrPython)
-########################################################################
-# Setup swig generation
-########################################################################
-foreach(incdir ${GNURADIO_CORE_INCLUDE_DIRS})
- list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/swig)
+foreach(incdir ${GNURADIO_RUNTIME_INCLUDE_DIRS})
+ list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gnuradio/swig)
endforeach(incdir)
-foreach(incdir ${GRUEL_INCLUDE_DIRS})
- list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gruel/swig)
-endforeach(incdir)
+set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/iqbalance_swig_doc.i)
+set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include/gnuradio/iqbalance)
+set(GR_SWIG_DOCS_TARGET_DEPS runtime_swig_swig_doc)
set(GR_SWIG_LIBRARIES gnuradio-iqbalance)
-set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/iqbalance_swig_doc.i)
-set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
GR_SWIG_MAKE(iqbalance_swig iqbalance_swig.i)
-########################################################################
-# Install the build swig module
-########################################################################
-GR_SWIG_INSTALL(TARGETS iqbalance_swig DESTINATION ${GR_PYTHON_DIR}/iqbalance)
+GR_SWIG_INSTALL(TARGETS iqbalance_swig DESTINATION ${GR_PYTHON_DIR}/gnuradio/iqbalance)
-########################################################################
-# Install swig .i files for development
-########################################################################
install(
FILES
iqbalance_swig.i
${CMAKE_CURRENT_BINARY_DIR}/iqbalance_swig_doc.i
- DESTINATION ${GR_INCLUDE_DIR}/iqbalance/swig
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
)
diff --git a/swig/iqbalance_swig.i b/swig/iqbalance_swig.i
index 271377d..ef34576 100644
--- a/swig/iqbalance_swig.i
+++ b/swig/iqbalance_swig.i
@@ -9,12 +9,12 @@
%{
-#include "iqbalance_fix_cc.h"
-#include "iqbalance_optimize_c.h"
+#include "gnuradio/iqbalance/fix_cc.h"
+#include "gnuradio/iqbalance/optimize_c.h"
%}
-GR_SWIG_BLOCK_MAGIC(iqbalance,fix_cc);
-%include "iqbalance_fix_cc.h"
+%include "gnuradio/iqbalance/fix_cc.h"
+GR_SWIG_BLOCK_MAGIC2(iqbalance, fix_cc);
-GR_SWIG_BLOCK_MAGIC(iqbalance,optimize_c);
-%include "iqbalance_optimize_c.h"
+%include "gnuradio/iqbalance/optimize_c.h"
+GR_SWIG_BLOCK_MAGIC2(iqbalance, optimize_c);