start applying changes from modtool
This commit is contained in:
+16
-4
@@ -1,6 +1,6 @@
|
||||
# Copyright 2011 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of GNU Radio
|
||||
# This file is part of gr-foo
|
||||
#
|
||||
# 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
|
||||
@@ -17,21 +17,33 @@
|
||||
# the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
|
||||
########################################################################
|
||||
# Check if there is C++ code at all
|
||||
########################################################################
|
||||
if(NOT foo_sources)
|
||||
MESSAGE(STATUS "No C++ sources... skipping swig/")
|
||||
return()
|
||||
endif(NOT foo_sources)
|
||||
|
||||
########################################################################
|
||||
# Include swig generation macros
|
||||
########################################################################
|
||||
find_package(SWIG)
|
||||
find_package(PythonLibs)
|
||||
if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND)
|
||||
return()
|
||||
endif()
|
||||
include(GrSwig)
|
||||
include(GrPython)
|
||||
|
||||
########################################################################
|
||||
# Setup swig generation
|
||||
########################################################################
|
||||
foreach(incdir ${GNURADIO_RUNTIME_INCLUDE_DIRS})
|
||||
list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gnuradio/swig)
|
||||
endforeach(incdir)
|
||||
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-foo)
|
||||
|
||||
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/foo_swig_doc.i)
|
||||
set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
|
||||
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
/* -*- c++ -*- */
|
||||
|
||||
#define FOO_API
|
||||
|
||||
%include "gnuradio.i"
|
||||
%include "gnuradio.i" // the common stuff
|
||||
|
||||
//load generated python docstrings
|
||||
%include "foo_swig_doc.i"
|
||||
|
||||
Reference in New Issue
Block a user