summaryrefslogtreecommitdiff
path: root/gr-digital
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital')
-rw-r--r--gr-digital/CMakeLists.txt108
-rw-r--r--gr-digital/grc/CMakeLists.txt34
-rw-r--r--gr-digital/lib/CMakeLists.txt74
-rw-r--r--gr-digital/python/CMakeLists.txt71
-rw-r--r--gr-digital/swig/CMakeLists.txt52
5 files changed, 339 insertions, 0 deletions
diff --git a/gr-digital/CMakeLists.txt b/gr-digital/CMakeLists.txt
new file mode 100644
index 000000000..b70073ffe
--- /dev/null
+++ b/gr-digital/CMakeLists.txt
@@ -0,0 +1,108 @@
+# 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-digital" ENABLE_GR_DIGITAL
+ 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_DIGITAL_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/lib
+)
+
+GR_SET_GLOBAL(GR_DIGITAL_SWIG_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/swig
+)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_GR_DIGITAL)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_SET(CPACK_COMPONENT_GROUP_TRELLIS_DESCRIPTION "The GNU Radio Digital Blocks")
+
+CPACK_COMPONENT("digital_runtime"
+ GROUP "Digital"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Dynamic link libraries"
+ DEPENDS "core_runtime"
+)
+
+CPACK_COMPONENT("digital_devel"
+ GROUP "Digital"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+ DEPENDS "core_devel"
+)
+
+CPACK_COMPONENT("digital_python"
+ GROUP "Digital"
+ DISPLAY_NAME "Python"
+ DESCRIPTION "Python modules for runtime"
+ DEPENDS "core_python;digital_runtime"
+)
+
+CPACK_COMPONENT("digital_swig"
+ GROUP "Digital"
+ DISPLAY_NAME "SWIG"
+ DESCRIPTION "SWIG development .i files"
+ DEPENDS "core_swig;digital_python;digital_devel"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(lib)
+IF(ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(swig)
+ ADD_SUBDIRECTORY(python)
+ ADD_SUBDIRECTORY(grc)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Create Pkg Config File
+########################################################################
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-digital.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-digital.pc
+@ONLY)
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-digital.pc
+ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
+ COMPONENT "digital_devel"
+)
+
+ENDIF(ENABLE_GR_DIGITAL)
diff --git a/gr-digital/grc/CMakeLists.txt b/gr-digital/grc/CMakeLists.txt
new file mode 100644
index 000000000..b6c26b0db
--- /dev/null
+++ b/gr-digital/grc/CMakeLists.txt
@@ -0,0 +1,34 @@
+# 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(FILES
+ digital_block_tree.xml
+ digital_costas_loop_cc.xml
+ digital_cma_equalizer_cc.xml
+ digital_lms_dd_equalizer_cc.xml
+ digital_kurtotic_equalizer_cc.xml
+ digital_dxpsk_mod.xml
+ digital_dxpsk_demod.xml
+ digital_psk_mod.xml
+ digital_psk_demod.xml
+ digital_qam_mod.xml
+ digital_qam_demod.xml
+ DESTINATION ${GRC_BLOCKS_DIR}
+ COMPONENT "digital_python"
+)
diff --git a/gr-digital/lib/CMakeLists.txt b/gr-digital/lib/CMakeLists.txt
new file mode 100644
index 000000000..fa696485b
--- /dev/null
+++ b/gr-digital/lib/CMakeLists.txt
@@ -0,0 +1,74 @@
+# 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_DIGITAL_INCLUDE_DIRS}
+)
+
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+########################################################################
+# Setup library
+########################################################################
+LIST(APPEND gr_digital_sources
+ digital_constellation.cc
+ digital_constellation_receiver_cb.cc
+ digital_constellation_decoder_cb.cc
+ digital_costas_loop_cc.cc
+ digital_cma_equalizer_cc.cc
+ digital_lms_dd_equalizer_cc.cc
+ digital_kurtotic_equalizer_cc.cc
+)
+
+LIST(APPEND digital_libs
+ gnuradio-core
+ ${Boost_LIBRARIES}
+)
+
+ADD_LIBRARY(gnuradio-digital SHARED ${gr_digital_sources})
+TARGET_LINK_LIBRARIES(gnuradio-digital ${digital_libs})
+SET_TARGET_PROPERTIES(gnuradio-digital PROPERTIES DEFINE_SYMBOL "gnuradio_digital_EXPORTS")
+SET_TARGET_PROPERTIES(gnuradio-digital PROPERTIES SOVERSION ${LIBVER})
+
+INSTALL(TARGETS gnuradio-digital
+ LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "digital_runtime" # .so/.dylib file
+ ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "digital_devel" # .lib file
+ RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "digital_runtime" # .dll file
+)
+
+########################################################################
+# Install header files
+########################################################################
+INSTALL(FILES
+ digital_constellation.h
+ digital_constellation_receiver_cb.h
+ digital_constellation_decoder_cb.h
+ digital_costas_loop_cc.h
+ digital_cma_equalizer_cc.h
+ digital_lms_dd_equalizer_cc.h
+ digital_kurtotic_equalizer_cc.h
+ digital_metric_type.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "digital_devel"
+)
diff --git a/gr-digital/python/CMakeLists.txt b/gr-digital/python/CMakeLists.txt
new file mode 100644
index 000000000..9fb110a61
--- /dev/null
+++ b/gr-digital/python/CMakeLists.txt
@@ -0,0 +1,71 @@
+# 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
+ psk.py
+ dbpsk.py
+ dqpsk.py
+ d8psk.py
+ psk2.py
+ generic_mod_demod.py
+ qam.py
+ bpsk.py
+ qpsk.py
+ ofdm.py
+ pkt.py
+ modulation_utils2.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/digital
+ COMPONENT "digital_python"
+)
+
+GR_PYTHON_INSTALL(
+ FILES
+ utils/__init__.py
+ utils/gray_code.py
+ utils/mod_codes.py
+ utils/alignment.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/digital/utils
+ COMPONENT "digital_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-digital/python
+ ${CMAKE_BINARY_DIR}/gr-digital/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-digital/swig/CMakeLists.txt b/gr-digital/swig/CMakeLists.txt
new file mode 100644
index 000000000..a7374f0f0
--- /dev/null
+++ b/gr-digital/swig/CMakeLists.txt
@@ -0,0 +1,52 @@
+# 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_DIGITAL_INCLUDE_DIRS}
+ ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
+)
+
+SET(GR_SWIG_LIBRARIES gnuradio-digital)
+
+GR_SWIG_MAKE(digital_swig digital_swig.i)
+
+GR_SWIG_INSTALL(
+ TARGETS digital_swig
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/digital
+ COMPONENT "digital_python"
+)
+
+INSTALL(
+ FILES
+ digital_constellation.i
+ digital_constellation_receiver_cb.i
+ digital_constellation_decoder_cb.i
+ digital_costas_loop_cc.i
+ digital_cma_equalizer_cc.i
+ digital_lms_dd_equalizer_cc.i
+ digital_kurtotic_equalizer_cc.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "digital_swig"
+)