gr-fosphor: Remove all SWIG stuff

Part of GNURadio 3.9 migration

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
master
Sylvain Munaut 2 years ago
parent 490eaca69d
commit c1d5d7b63f
  1. 4
      CMakeLists.txt
  2. 2
      include/gnuradio/fosphor/qt_sink_c.h
  3. 2
      lib/qt_sink_c_impl.h
  4. 1
      python/CMakeLists.txt
  5. 3
      python/__init__.py
  6. 48
      swig/CMakeLists.txt
  7. 30
      swig/fosphor_swig.i

@ -125,7 +125,6 @@ endif (Qt5_FOUND)
find_package(Doxygen)
find_package(PythonLibs 3)
find_package(SWIG)
########################################################################
# Setup doxygen option
@ -143,7 +142,7 @@ endif(DOXYGEN_FOUND)
include(GrComponent)
GR_REGISTER_COMPONENT("Python" ENABLE_PYTHON
PYTHONLIBS_FOUND SWIG_FOUND
PYTHONLIBS_FOUND
)
GR_REGISTER_COMPONENT("GLFW" ENABLE_GLFW
@ -179,7 +178,6 @@ add_subdirectory(include/gnuradio/fosphor)
add_subdirectory(lib)
if(ENABLE_PYTHON)
add_subdirectory(swig)
add_subdirectory(python)
add_subdirectory(grc)
add_subdirectory(apps)

@ -42,7 +42,7 @@ namespace gr {
virtual void exec_() = 0;
virtual QWidget* qwidget() = 0;
#if defined(PY_VERSION) || defined(SWIGPYTHON)
#if defined(PY_VERSION)
virtual PyObject* pyqwidget() = 0;
#else
virtual void* pyqwidget() = 0;

@ -43,7 +43,7 @@ namespace gr {
void exec_();
QWidget* qwidget();
#if defined(PY_VERSION) || defined(SWIGPYTHON)
#if defined(PY_VERSION)
PyObject* pyqwidget();
#else
void* pyqwidget();

@ -32,4 +32,3 @@ GR_PYTHON_INSTALL(
include(GrTest)
set(GR_TEST_TARGET_DEPS gnuradio-fosphor)
set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}/swig)

@ -4,6 +4,3 @@
# This file is part of gr-fosphor
#
# SPDX-License-Identifier: GPL-3.0-or-later
# import swig generated symbols into the fosphor namespace
from .fosphor_swig import *

@ -1,48 +0,0 @@
# Copyright 2011-2020 Free Software Foundation, Inc.
# Copyright 2013-2021 Sylvain Munaut <tnt@246tNt.com>
#
# This file is part of gr-fosphor
#
# SPDX-License-Identifier: GPL-3.0-or-later
########################################################################
# Include swig generation macros
########################################################################
find_package(SWIG)
find_package(PythonLibs 3)
if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND)
return()
endif()
include(GrSwig)
include(GrPython)
########################################################################
# Setup swig generation
########################################################################
set(GR_SWIG_INCLUDE_DIRS $<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES>)
set(GR_SWIG_TARGET_DEPS gnuradio::runtime_swig)
set(GR_SWIG_LIBRARIES gnuradio-fosphor)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/fosphor_swig_doc.i)
set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include/gnuradio/fosphor)
list_cond_append(ENABLE_GLFW GR_SWIG_FLAGS -DENABLE_GLFW)
list_cond_append(ENABLE_QT GR_SWIG_FLAGS -DENABLE_QT)
GR_SWIG_MAKE(fosphor_swig fosphor_swig.i)
########################################################################
# Install the build swig module
########################################################################
GR_SWIG_INSTALL(TARGETS fosphor_swig DESTINATION ${GR_PYTHON_DIR}/gnuradio/fosphor)
########################################################################
# Install swig .i files for development
########################################################################
install(
FILES
fosphor_swig.i
${CMAKE_CURRENT_BINARY_DIR}/fosphor_swig_doc.i
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
)

@ -1,30 +0,0 @@
/* -*- c++ -*- */
#define GR_FOSPHOR_API
%include "gnuradio.i" // the common stuff
//load generated python docstrings
%include "fosphor_swig_doc.i"
%{
#include "gnuradio/fosphor/glfw_sink_c.h"
#include "gnuradio/fosphor/qt_sink_c.h"
%}
%typemap(in) gr::fft::window::win_type {
$1 = (gr::fft::window::win_type)(PyInt_AsLong($input));
}
%include "gnuradio/fosphor/base_sink_c.h"
#ifdef ENABLE_GLFW
%nodefaultctor gr::fosphor::glfw_sink_c; // bug workaround
%include "gnuradio/fosphor/glfw_sink_c.h"
GR_SWIG_BLOCK_MAGIC2(fosphor, glfw_sink_c);
#endif
#ifdef ENABLE_QT
%include "gnuradio/fosphor/qt_sink_c.h"
GR_SWIG_BLOCK_MAGIC2(fosphor, qt_sink_c);
#endif
Loading…
Cancel
Save