diff options
Diffstat (limited to 'gnuradio-core/src/lib/swig')
-rw-r--r-- | gnuradio-core/src/lib/swig/CMakeLists.txt | 93 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_core_general.i | 2 |
2 files changed, 95 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/swig/CMakeLists.txt b/gnuradio-core/src/lib/swig/CMakeLists.txt new file mode 100644 index 000000000..c46b720c5 --- /dev/null +++ b/gnuradio-core/src/lib/swig/CMakeLists.txt @@ -0,0 +1,93 @@ +# Copyright 2010-2011 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. + +######################################################################## +INCLUDE(GrPython) +INCLUDE(GrSwig) + +INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) +LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) + +SET(GR_SWIG_INCLUDE_DIRS + ${Boost_INCLUDE_DIRS} + ${GSL_INCLUDE_DIRS} + ${GRUEL_INCLUDE_DIRS} + ${GNURADIO_CORE_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR} +) +SET(GR_SWIG_LIBRARIES gnuradio-core) + +######################################################################## +# Build and install the swig targets +######################################################################## +# ---------------------------------------------------------------- +# We've split the previously monstrous gnuradio_corethon into 6 +# smaller pieces. This reduces compile time coupling and creates +# smaller pieces for the compiler to digest. prior to this change, on +# X86_64, g++'s resident set size was 650MB! +# ---------------------------------------------------------------- +GR_SWIG_MAKE(gnuradio_core_runtime gnuradio_core_runtime.i) +GR_SWIG_MAKE(gnuradio_core_general gnuradio_core_general.i) +SET(GR_SWIG_TARGET_DEPS gengen_generated) +GR_SWIG_MAKE(gnuradio_core_gengen gnuradio_core_gengen.i) +SET(GR_SWIG_TARGET_DEPS filter_generated) +GR_SWIG_MAKE(gnuradio_core_filter gnuradio_core_filter.i) +UNSET(GR_SWIG_TARGET_DEPS) +GR_SWIG_MAKE(gnuradio_core_io gnuradio_core_io.i) +GR_SWIG_MAKE(gnuradio_core_hier gnuradio_core_hier.i) + +GR_SWIG_INSTALL(TARGETS + gnuradio_core_runtime + gnuradio_core_general + gnuradio_core_gengen + gnuradio_core_filter + gnuradio_core_io + gnuradio_core_hier + DESTINATION ${GR_PYTHON_DIR}/gnuradio/gr + COMPONENT "core_python" +) + +######################################################################## +# Install various files +######################################################################## +INSTALL(FILES + gnuradio.i + gr_swig_block_magic.i + gr_shared_ptr.i + gnuradio_core_runtime.i + gnuradio_core_general.i + gnuradio_core_gengen.i + gnuradio_core_filter.i + gnuradio_core_io.i + gnuradio_core_hier.i + DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig + COMPONENT "core_swig" +) + +GR_PYTHON_INSTALL( + FILES gnuradio_core.py + DESTINATION ${GR_PYTHON_DIR}/gnuradio/gr + COMPONENT "core_python" +) + +INSTALL( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio_swig_bug_workaround.h + DESTINATION ${GR_INCLUDE_DIR}/gnuradio + COMPONENT "core_swig" +) diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_general.i b/gnuradio-core/src/lib/swig/gnuradio_core_general.i index adf6b469a..b34d4f936 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core_general.i +++ b/gnuradio-core/src/lib/swig/gnuradio_core_general.i @@ -19,6 +19,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#define GR_CORE_API + #ifndef SWIGIMPORTED %module(directors="1") gnuradio_core_general #endif |