Fix Swig issue with the debug blocks
This commit is contained in:
parent
12a2aa0090
commit
4f45abaf08
|
@ -43,32 +43,51 @@ foreach(incdir ${GNURADIO_RUNTIME_INCLUDE_DIRS})
|
||||||
list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gnuradio/swig)
|
list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gnuradio/swig)
|
||||||
endforeach(incdir)
|
endforeach(incdir)
|
||||||
|
|
||||||
set(GR_SWIG_LIBRARIES gnuradio-satnogs)
|
if(${INCLUDE_DEBUG_BLOCKS})
|
||||||
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/satnogs_swig_doc.i)
|
set(INCLUDE_DEBUG_BLOCKS_BOOL_VAL 1)
|
||||||
set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
else()
|
||||||
|
set(INCLUDE_DEBUG_BLOCKS_BOOL_VAL 0)
|
||||||
|
endif()
|
||||||
|
|
||||||
GR_SWIG_MAKE(satnogs_swig satnogs_swig.i)
|
configure_file(
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/satnogs_swig.py.in
|
||||||
########################################################################
|
${CMAKE_CURRENT_BINARY_DIR}/satnogs_swig.py
|
||||||
# Install the build swig module
|
@ONLY)
|
||||||
########################################################################
|
|
||||||
GR_SWIG_INSTALL(TARGETS satnogs_swig DESTINATION ${GR_PYTHON_DIR}/satnogs)
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# Install swig .i files for development
|
|
||||||
########################################################################
|
|
||||||
list(APPEND swig_files
|
|
||||||
satnogs_swig.i
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/satnogs_swig_doc.i
|
|
||||||
)
|
|
||||||
|
|
||||||
if(${INCLUDE_DEBUG_BLOCKS})
|
if(${INCLUDE_DEBUG_BLOCKS})
|
||||||
list(APPEND swig_files "satnogs_debug_swig.i")
|
set(SATONGS_SWIG_FILES
|
||||||
|
satnogs_swig0
|
||||||
|
satnogs_debug_swig
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(SATONGS_SWIG_FILES
|
||||||
|
satnogs_swig0
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
foreach(swigfile ${SATONGS_SWIG_FILES})
|
||||||
|
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/${swigfile}_doc.i)
|
||||||
|
set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||||
|
|
||||||
|
set(GR_SWIG_LIBRARIES gnuradio-satnogs)
|
||||||
|
GR_SWIG_MAKE(${swigfile} ${swigfile}.i)
|
||||||
|
|
||||||
|
GR_SWIG_INSTALL(TARGETS ${swigfile} DESTINATION ${GR_PYTHON_DIR}/satnogs)
|
||||||
|
|
||||||
|
list(APPEND SWIGFILES ${swigfile}.i)
|
||||||
|
list(APPEND SWIGDOCFILES ${CMAKE_CURRENT_BINARY_DIR}/${swigfile}_doc.i)
|
||||||
|
endforeach(swigfile)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
${swig_files}
|
${SWIGFILES}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/satnogs_swig_doc.i
|
${SWIGDOCFILES}
|
||||||
DESTINATION ${GR_INCLUDE_DIR}/satnogs/swig
|
DESTINATION ${GR_INCLUDE_DIR}/satnogs/swig
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Install the Python file that pulls in the swig built files.
|
||||||
|
GR_PYTHON_INSTALL(
|
||||||
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/satnogs_swig.py
|
||||||
|
DESTINATION ${GR_PYTHON_DIR}/satnogs
|
||||||
|
COMPONENT "satnogs_python"
|
||||||
|
)
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
/* -*- c++ -*- */
|
/* -*- c++ -*- */
|
||||||
|
|
||||||
|
#define SATNOGS_API
|
||||||
|
|
||||||
%include <typemaps.i>
|
%include <typemaps.i>
|
||||||
%include "gnuradio.i" // the common stuff
|
%include "gnuradio.i" // the common stuff
|
||||||
|
|
||||||
//load generated python docstrings
|
//load generated python docstrings
|
||||||
%include "satnogs_swig_doc.i"
|
%include "satnogs_debug_swig_doc.i"
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include "satnogs/morse_debug_source.h"
|
#include "satnogs/morse_debug_source.h"
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
#! /usr/bin/python
|
||||||
|
#
|
||||||
|
# gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
|
||||||
|
#
|
||||||
|
# Copyright (C) 2018
|
||||||
|
# Libre Space Foundation <http://librespacefoundation.org/>
|
||||||
|
#
|
||||||
|
# This program 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 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program 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 program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
#
|
||||||
|
|
||||||
|
from satnogs_swig0 import *
|
||||||
|
if @INCLUDE_DEBUG_BLOCKS_BOOL_VAL@:
|
||||||
|
from satnogs_debug_swig import *
|
|
@ -6,7 +6,7 @@
|
||||||
%include "gnuradio.i" // the common stuff
|
%include "gnuradio.i" // the common stuff
|
||||||
|
|
||||||
//load generated python docstrings
|
//load generated python docstrings
|
||||||
%include "satnogs_swig_doc.i"
|
%include "satnogs_swig0_doc.i"
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include "satnogs/morse_tree.h"
|
#include "satnogs/morse_tree.h"
|
Loading…
Reference in New Issue