start applying changes from modtool

This commit is contained in:
Bastian Bloessl
2019-02-21 17:57:34 +00:00
parent 450a37bb5e
commit 404cda65ca
7 changed files with 91 additions and 64 deletions
+16 -4
View File
@@ -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)