summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum2011-07-21 00:05:05 -0700
committerJosh Blum2011-07-21 00:05:05 -0700
commitc79eb945a803ea4330c687bd441b250af56d6fac (patch)
tree863b019a5d1e88be47ccd883dfd3f17a66f3c538
parent404840194223637c34a71fd45c1bc8438889f57d (diff)
downloadgnuradio-c79eb945a803ea4330c687bd441b250af56d6fac.tar.gz
gnuradio-c79eb945a803ea4330c687bd441b250af56d6fac.tar.bz2
gnuradio-c79eb945a803ea4330c687bd441b250af56d6fac.zip
vocoder: added cmake support for gr-vocoder (unix only)
-rw-r--r--CMakeLists.txt1
-rw-r--r--gr-vocoder/CMakeLists.txt104
-rw-r--r--gr-vocoder/examples/CMakeLists.txt0
-rw-r--r--gr-vocoder/include/CMakeLists.txt36
-rw-r--r--gr-vocoder/lib/CMakeLists.txt68
-rw-r--r--gr-vocoder/lib/codec2/CMakeLists.txt109
-rw-r--r--gr-vocoder/lib/g7xx/CMakeLists.txt30
-rw-r--r--gr-vocoder/lib/gsm/CMakeLists.txt49
-rw-r--r--gr-vocoder/python/CMakeLists.txt50
-rw-r--r--gr-vocoder/swig/CMakeLists.txt55
10 files changed, 502 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 069141238..4ad5241c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -166,6 +166,7 @@ ADD_SUBDIRECTORY(gr-pager)
ADD_SUBDIRECTORY(gr-qtgui)
ADD_SUBDIRECTORY(gr-trellis)
ADD_SUBDIRECTORY(gr-uhd)
+ADD_SUBDIRECTORY(gr-vocoder)
ADD_SUBDIRECTORY(gr-wxgui)
#finalize cpack after subdirs processed
diff --git a/gr-vocoder/CMakeLists.txt b/gr-vocoder/CMakeLists.txt
new file mode 100644
index 000000000..812fb728a
--- /dev/null
+++ b/gr-vocoder/CMakeLists.txt
@@ -0,0 +1,104 @@
+# Copyright 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.
+
+########################################################################
+# Setup dependencies
+########################################################################
+INCLUDE(GrBoost)
+
+########################################################################
+# Register component
+########################################################################
+INCLUDE(GrComponent)
+GR_REGISTER_COMPONENT("gr-vocoder" ENABLE_GR_VOCODER
+ UNIX #FIXME until we get MSVC working
+ Boost_FOUND
+ ENABLE_GR_CORE_
+)
+
+REMOVE_DEFINITIONS(-fvisibility=hidden) #FIXME until we do symbol visibility
+
+GR_SET_GLOBAL(GR_VOCODER_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_GR_VOCODER)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_SET(CPACK_COMPONENT_GROUP_TRELLIS_DESCRIPTION "The GNU Radio Vocoder Blocks")
+
+CPACK_COMPONENT("vocoder_runtime"
+ GROUP "Vocoder"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Dynamic link libraries"
+ DEPENDS "core_runtime"
+)
+
+CPACK_COMPONENT("vocoder_devel"
+ GROUP "Vocoder"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+ DEPENDS "core_devel"
+)
+
+CPACK_COMPONENT("vocoder_python"
+ GROUP "Vocoder"
+ DISPLAY_NAME "Python"
+ DESCRIPTION "Python modules for runtime"
+ DEPENDS "core_python;vocoder_runtime"
+)
+
+CPACK_COMPONENT("vocoder_swig"
+ GROUP "Vocoder"
+ DISPLAY_NAME "SWIG"
+ DESCRIPTION "SWIG development .i files"
+ DEPENDS "core_swig;vocoder_python;vocoder_devel"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(lib)
+ADD_SUBDIRECTORY(include)
+IF(ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(swig)
+ ADD_SUBDIRECTORY(python)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Create Pkg Config File
+########################################################################
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-vocoder.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-vocoder.pc
+@ONLY)
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-vocoder.pc
+ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
+ COMPONENT "vocoder_devel"
+)
+
+ENDIF(ENABLE_GR_VOCODER)
diff --git a/gr-vocoder/examples/CMakeLists.txt b/gr-vocoder/examples/CMakeLists.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/gr-vocoder/examples/CMakeLists.txt
diff --git a/gr-vocoder/include/CMakeLists.txt b/gr-vocoder/include/CMakeLists.txt
new file mode 100644
index 000000000..4e88d9af2
--- /dev/null
+++ b/gr-vocoder/include/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Copyright 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.
+
+########################################################################
+# Install header files
+########################################################################
+INSTALL(FILES
+ vocoder_alaw_decode_bs.h
+ vocoder_alaw_encode_sb.h
+ vocoder_codec2_decode_ps.h
+ vocoder_codec2_encode_sp.h
+ vocoder_cvsd_decode_bs.h
+ vocoder_cvsd_encode_sb.h
+ vocoder_gsm_fr_decode_ps.h
+ vocoder_gsm_fr_encode_sp.h
+ vocoder_ulaw_decode_bs.h
+ vocoder_ulaw_encode_sb.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "vocoder_devel"
+)
diff --git a/gr-vocoder/lib/CMakeLists.txt b/gr-vocoder/lib/CMakeLists.txt
new file mode 100644
index 000000000..c4c6dabe5
--- /dev/null
+++ b/gr-vocoder/lib/CMakeLists.txt
@@ -0,0 +1,68 @@
+# Copyright 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.
+
+########################################################################
+# Setup the include and linker paths
+########################################################################
+INCLUDE_DIRECTORIES(
+ ${GNURADIO_CORE_INCLUDE_DIRS}
+ ${GR_VOCODER_INCLUDE_DIRS}
+)
+
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+########################################################################
+# Setup library
+########################################################################
+LIST(APPEND gr_vocoder_sources
+ vocoder_alaw_decode_bs.cc
+ vocoder_alaw_encode_sb.cc
+ vocoder_codec2_decode_ps.cc
+ vocoder_codec2_encode_sp.cc
+ vocoder_cvsd_encode_sb.cc
+ vocoder_cvsd_decode_bs.cc
+ vocoder_gsm_fr_decode_ps.cc
+ vocoder_gsm_fr_encode_sp.cc
+ vocoder_ulaw_decode_bs.cc
+ vocoder_ulaw_encode_sb.cc
+)
+
+########################################################################
+# Include subdirs rather to populate to the sources lists.
+########################################################################
+GR_INCLUDE_SUBDIRECTORY(codec2)
+GR_INCLUDE_SUBDIRECTORY(g7xx)
+GR_INCLUDE_SUBDIRECTORY(gsm)
+
+LIST(APPEND vocoder_libs
+ gnuradio-core
+ ${Boost_LIBRARIES}
+)
+
+ADD_LIBRARY(gnuradio-vocoder SHARED ${gr_vocoder_sources})
+TARGET_LINK_LIBRARIES(gnuradio-vocoder ${vocoder_libs})
+SET_TARGET_PROPERTIES(gnuradio-vocoder PROPERTIES DEFINE_SYMBOL "gnuradio_vocoder_EXPORTS")
+SET_TARGET_PROPERTIES(gnuradio-vocoder PROPERTIES SOVERSION ${LIBVER})
+
+INSTALL(TARGETS gnuradio-vocoder
+ LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "vocoder_runtime" # .so/.dylib file
+ ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "vocoder_devel" # .lib file
+ RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "vocoder_runtime" # .dll file
+)
diff --git a/gr-vocoder/lib/codec2/CMakeLists.txt b/gr-vocoder/lib/codec2/CMakeLists.txt
new file mode 100644
index 000000000..2b8273d16
--- /dev/null
+++ b/gr-vocoder/lib/codec2/CMakeLists.txt
@@ -0,0 +1,109 @@
+# Copyright 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.
+
+########################################################################
+# Create executable to generate other sources
+########################################################################
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+ADD_EXECUTABLE(generate_codebook ${CMAKE_CURRENT_SOURCE_DIR}/generate_codebook.c)
+TARGET_LINK_LIBRARIES(generate_codebook -lm)
+
+########################################################################
+# Create codebook
+########################################################################
+SET(CODEBOOKS
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp1.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp2.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp3.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp4.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp5.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp6.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp7.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp8.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp9.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp10.txt
+)
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/codebook.c
+ DEPENDS generate_codebook ${CODEBOOKS}
+ COMMAND generate_codebook lsp_cb ${CODEBOOKS} > ${CMAKE_CURRENT_BINARY_DIR}/codebook.c
+)
+
+########################################################################
+# Create codebookd
+########################################################################
+SET(CODEBOOKSD
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp1.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp2.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp3.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp4.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp5.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp6.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp7.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp8.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp9.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp10.txt
+)
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/codebookd.c
+ DEPENDS generate_codebook ${CODEBOOKSD}
+ COMMAND generate_codebook lsp_cbd ${CODEBOOKSD} > ${CMAKE_CURRENT_BINARY_DIR}/codebookd.c
+)
+
+########################################################################
+# Create codebookdvq
+########################################################################
+SET(CODEBOOKSDVQ
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp1.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp2.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp3.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp4.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp5.txt
+)
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/codebookdvq.c
+ DEPENDS generate_codebook ${CODEBOOKSDVQ}
+ COMMAND generate_codebook lsp_cbdvq ${CODEBOOKSDVQ} > ${CMAKE_CURRENT_BINARY_DIR}/codebookdvq.c
+)
+
+########################################################################
+# Append all sources in this dir
+########################################################################
+LIST(APPEND gr_vocoder_sources
+ ${CMAKE_CURRENT_BINARY_DIR}/codebook.c
+ ${CMAKE_CURRENT_BINARY_DIR}/codebookd.c
+ ${CMAKE_CURRENT_BINARY_DIR}/codebookdvq.c
+
+ ${CMAKE_CURRENT_SOURCE_DIR}/dump.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/lpc.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/nlp.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/postfilter.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/sine.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/codec2.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/fft.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/kiss_fft.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/interp.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/lsp.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/phase.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/quantise.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/pack.c
+)
diff --git a/gr-vocoder/lib/g7xx/CMakeLists.txt b/gr-vocoder/lib/g7xx/CMakeLists.txt
new file mode 100644
index 000000000..4c67109e1
--- /dev/null
+++ b/gr-vocoder/lib/g7xx/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Copyright 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.
+
+########################################################################
+# Append all sources in this dir
+########################################################################
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+LIST(APPEND gr_vocoder_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/g711.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/g72x.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/g721.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/g723_24.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/g723_40.c
+)
diff --git a/gr-vocoder/lib/gsm/CMakeLists.txt b/gr-vocoder/lib/gsm/CMakeLists.txt
new file mode 100644
index 000000000..128f87231
--- /dev/null
+++ b/gr-vocoder/lib/gsm/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Copyright 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.
+
+########################################################################
+# Append all sources in this dir
+########################################################################
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+
+SET(gsm_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/add.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/code.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/debug.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/decode.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/gsm_create.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/gsm_decode.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/gsm_destroy.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/gsm_encode.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/gsm_explode.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/gsm_implode.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/gsm_option.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/gsm_print.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/long_term.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/lpc.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/preprocess.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/rpe.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/short_term.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/table.c
+)
+
+SET_SOURCE_FILES_PROPERTIES(${gsm_sources}
+ PROPERTIES COMPILE_DEFINITION "NeedFunctionPrototypes=1"
+)
+LIST(APPEND gr_vocoder_sources ${gsm_sources})
diff --git a/gr-vocoder/python/CMakeLists.txt b/gr-vocoder/python/CMakeLists.txt
new file mode 100644
index 000000000..4ea8d23e1
--- /dev/null
+++ b/gr-vocoder/python/CMakeLists.txt
@@ -0,0 +1,50 @@
+# Copyright 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.
+
+########################################################################
+# Setup python install
+########################################################################
+INCLUDE(GrPython)
+
+GR_PYTHON_INSTALL(
+ FILES
+ __init__.py
+ cvsd.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/vocoder
+ COMPONENT "vocoder_python"
+)
+
+########################################################################
+# Handle the unit tests
+########################################################################
+IF(ENABLE_TESTING)
+INCLUDE(GrTest)
+FILE(GLOB py_qa_test_files "qa_*.py")
+FOREACH(py_qa_test_file ${py_qa_test_files})
+ GET_FILENAME_COMPONENT(py_qa_test_name ${py_qa_test_file} NAME_WE)
+ SET(GR_TEST_PYTHON_DIRS
+ ${CMAKE_BINARY_DIR}/gnuradio-core/src/python
+ ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig
+ ${CMAKE_BINARY_DIR}/gr-vocoder/python
+ ${CMAKE_BINARY_DIR}/gr-vocoder/swig
+ )
+ SET(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-qtgui)
+ GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file})
+ENDFOREACH(py_qa_test_file)
+ENDIF(ENABLE_TESTING)
diff --git a/gr-vocoder/swig/CMakeLists.txt b/gr-vocoder/swig/CMakeLists.txt
new file mode 100644
index 000000000..e07dd34be
--- /dev/null
+++ b/gr-vocoder/swig/CMakeLists.txt
@@ -0,0 +1,55 @@
+# Copyright 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.
+
+########################################################################
+# Setup swig generation
+########################################################################
+INCLUDE(GrPython)
+INCLUDE(GrSwig)
+
+SET(GR_SWIG_INCLUDE_DIRS
+ ${GR_VOCODER_INCLUDE_DIRS}
+ ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
+)
+
+SET(GR_SWIG_LIBRARIES gnuradio-vocoder)
+
+GR_SWIG_MAKE(vocoder_swig vocoder_swig.i)
+
+GR_SWIG_INSTALL(
+ TARGETS vocoder_swig
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/vocoder
+ COMPONENT "vocoder_python"
+)
+
+INSTALL(
+ FILES
+ vocoder_alaw_decode_bs.i
+ vocoder_alaw_encode_sb.i
+ vocoder_codec2_decode_ps.i
+ vocoder_codec2_encode_sp.i
+ vocoder_cvsd_decode_bs.i
+ vocoder_cvsd_encode_sb.i
+ vocoder_gsm_fr_encode_sp.i
+ vocoder_gsm_fr_decode_ps.i
+ vocoder_ulaw_decode_bs.i
+ vocoder_ulaw_encode_sb.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "vocoder_swig"
+)