summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum2011-07-20 19:04:32 -0700
committerJosh Blum2011-07-20 19:04:32 -0700
commitaccb9f2fe8fd8f6a1e114adac5b15304b0e0012d (patch)
tree09ca98093b2555464265d64fd495fed6102159b4
parentf914499f4a96fe69ab9cd8dba48f8e3bfc7a54e5 (diff)
downloadgnuradio-accb9f2fe8fd8f6a1e114adac5b15304b0e0012d.tar.gz
gnuradio-accb9f2fe8fd8f6a1e114adac5b15304b0e0012d.tar.bz2
gnuradio-accb9f2fe8fd8f6a1e114adac5b15304b0e0012d.zip
gr: squashed cmakelists.txt into one commit
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt181
-rw-r--r--cmake/Modules/CMakeParseArgumentsCopy.cmake138
-rw-r--r--cmake/Modules/FindALSA.cmake36
-rw-r--r--cmake/Modules/FindCppUnit.cmake33
-rw-r--r--cmake/Modules/FindFFTW3f.cmake32
-rw-r--r--cmake/Modules/FindGSL.cmake143
-rw-r--r--cmake/Modules/FindGit.cmake46
-rw-r--r--cmake/Modules/FindJack.cmake87
-rw-r--r--cmake/Modules/FindOSS.cmake46
-rw-r--r--cmake/Modules/FindPortaudio.cmake107
-rw-r--r--cmake/Modules/FindQwt.cmake13
-rw-r--r--cmake/Modules/FindUHD.cmake24
-rw-r--r--cmake/Modules/GrBoost.cmake54
-rw-r--r--cmake/Modules/GrComponent.cmake82
-rw-r--r--cmake/Modules/GrMiscUtils.cmake100
-rw-r--r--cmake/Modules/GrPackage.cmake132
-rw-r--r--cmake/Modules/GrPlatform.cmake46
-rw-r--r--cmake/Modules/GrPython.cmake169
-rw-r--r--cmake/Modules/GrSwig.cmake90
-rw-r--r--cmake/Modules/GrTest.cmake111
-rw-r--r--cmake/Modules/GrVersion.cmake60
-rw-r--r--cmake/Modules/LibFindMacros.cmake99
-rw-r--r--cmake/cmake_uninstall.cmake.in23
-rw-r--r--cmake/msvc/config.h55
-rw-r--r--cmake/msvc/inttypes.h301
-rw-r--r--cmake/msvc/stdint.h251
-rw-r--r--cmake/msvc/sys/time.h69
-rw-r--r--cmake/msvc/unistd.h10
-rwxr-xr-xdebian/postinst2
-rwxr-xr-xdebian/prerm2
-rw-r--r--docs/CMakeLists.txt50
-rw-r--r--docs/doxygen/CMakeLists.txt51
-rw-r--r--gnuradio-core/CMakeLists.txt159
-rw-r--r--gnuradio-core/src/lib/CMakeLists.txt100
-rw-r--r--gnuradio-core/src/lib/ConfigChecks.cmake212
-rw-r--r--gnuradio-core/src/lib/filter/CMakeLists.txt339
-rw-r--r--gnuradio-core/src/lib/general/CMakeLists.txt306
-rw-r--r--gnuradio-core/src/lib/gengen/CMakeLists.txt191
-rw-r--r--gnuradio-core/src/lib/hier/CMakeLists.txt42
-rw-r--r--gnuradio-core/src/lib/io/CMakeLists.txt108
-rw-r--r--gnuradio-core/src/lib/missing/CMakeLists.txt32
-rw-r--r--gnuradio-core/src/lib/reed-solomon/CMakeLists.txt55
-rw-r--r--gnuradio-core/src/lib/runtime/CMakeLists.txt162
-rw-r--r--gnuradio-core/src/lib/swig/CMakeLists.txt93
-rw-r--r--gnuradio-core/src/lib/viterbi/CMakeLists.txt63
-rw-r--r--gnuradio-core/src/python/gnuradio/CMakeLists.txt43
-rw-r--r--gnuradio-core/src/python/gnuradio/blks2/CMakeLists.txt26
-rw-r--r--gnuradio-core/src/python/gnuradio/blks2impl/CMakeLists.txt66
-rw-r--r--gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt52
-rw-r--r--gnuradio-core/src/python/gnuradio/gru/CMakeLists.txt26
-rw-r--r--gnuradio-core/src/python/gnuradio/gruimpl/CMakeLists.txt39
-rw-r--r--gnuradio-core/src/tests/CMakeLists.txt71
-rw-r--r--gr-audio/CMakeLists.txt101
-rw-r--r--gr-audio/examples/c++/CMakeLists.txt23
-rw-r--r--gr-audio/examples/python/CMakeLists.txt37
-rw-r--r--gr-audio/grc/CMakeLists.txt22
-rw-r--r--gr-audio/include/CMakeLists.txt29
-rw-r--r--gr-audio/lib/CMakeLists.txt159
-rw-r--r--gr-audio/swig/CMakeLists.txt51
-rw-r--r--gr-noaa/CMakeLists.txt90
-rw-r--r--gr-noaa/apps/.gitignore2
-rw-r--r--gr-noaa/apps/CMakeLists.txt33
-rw-r--r--gr-noaa/grc/CMakeLists.txt26
-rw-r--r--gr-noaa/lib/CMakeLists.txt65
-rw-r--r--gr-noaa/swig/CMakeLists.txt56
-rw-r--r--gr-pager/CMakeLists.txt105
-rw-r--r--gr-pager/apps/CMakeLists.txt22
-rw-r--r--gr-pager/grc/CMakeLists.txt26
-rw-r--r--gr-pager/lib/CMakeLists.txt75
-rw-r--r--gr-pager/python/CMakeLists.txt49
-rw-r--r--gr-pager/swig/CMakeLists.txt51
-rw-r--r--gr-qtgui/CMakeLists.txt116
-rw-r--r--gr-qtgui/grc/CMakeLists.txt22
-rw-r--r--gr-qtgui/lib/CMakeLists.txt120
-rw-r--r--gr-qtgui/python/CMakeLists.txt46
-rw-r--r--gr-qtgui/swig/CMakeLists.txt49
-rw-r--r--gr-trellis/CMakeLists.txt118
-rw-r--r--gr-trellis/doc/CMakeLists.txt73
-rw-r--r--gr-trellis/src/examples/CMakeLists.txt64
-rw-r--r--gr-trellis/src/lib/CMakeLists.txt216
-rw-r--r--gr-trellis/src/lib/trellis_constellation_metrics_cf.cc2
-rw-r--r--gr-trellis/src/python/CMakeLists.txt36
-rw-r--r--gr-uhd/CMakeLists.txt106
-rw-r--r--gr-uhd/apps/CMakeLists.txt26
-rw-r--r--gr-uhd/grc/CMakeLists.txt45
-rw-r--r--gr-uhd/include/CMakeLists.txt29
-rw-r--r--gr-uhd/lib/CMakeLists.txt57
-rw-r--r--gr-uhd/swig/CMakeLists.txt53
-rw-r--r--gr-wxgui/CMakeLists.txt83
-rw-r--r--gr-wxgui/grc/CMakeLists.txt36
-rw-r--r--gr-wxgui/src/python/CMakeLists.txt88
-rw-r--r--grc/CMakeLists.txt118
-rw-r--r--grc/base/CMakeLists.txt42
-rw-r--r--grc/blocks/CMakeLists.txt22
-rw-r--r--grc/freedesktop/CMakeLists.txt47
-rw-r--r--grc/grc_gnuradio/CMakeLists.txt35
-rw-r--r--grc/gui/CMakeLists.txt48
-rw-r--r--grc/python/CMakeLists.txt45
-rw-r--r--grc/scripts/CMakeLists.txt25
-rw-r--r--gruel/CMakeLists.txt105
-rw-r--r--gruel/src/include/gruel/CMakeLists.txt56
-rw-r--r--gruel/src/include/gruel/Makefile.am2
-rw-r--r--gruel/src/lib/CMakeLists.txt110
-rw-r--r--gruel/src/lib/Makefile.am2
-rw-r--r--gruel/src/lib/msg/CMakeLists.txt28
-rw-r--r--gruel/src/lib/pmt/CMakeLists.txt90
-rw-r--r--gruel/src/python/CMakeLists.txt52
-rw-r--r--gruel/src/scheme/gnuradio/CMakeLists.txt26
-rw-r--r--gruel/src/swig/CMakeLists.txt41
110 files changed, 8127 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 5fa883862..233e153a5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+/build
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 000000000..0cb367233
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,181 @@
+# 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.
+
+########################################################################
+IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
+ MESSAGE(FATAL_ERROR "Prevented in-tree built. This is bad practice.")
+ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
+
+########################################################################
+# Project setup
+########################################################################
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(gnuradio)
+ENABLE_LANGUAGE(CXX)
+ENABLE_LANGUAGE(C)
+ENABLE_TESTING()
+
+#select the release build type by default to get optimization flags
+IF(NOT CMAKE_BUILD_TYPE)
+ SET(CMAKE_BUILD_TYPE "Release")
+ MESSAGE(STATUS "Build type not specified: defaulting to release.")
+ENDIF(NOT CMAKE_BUILD_TYPE)
+SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
+
+LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
+
+INCLUDE(GrVersion) #setup version info
+
+########################################################################
+# Compiler specific setup
+########################################################################
+IF(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
+ #http://gcc.gnu.org/wiki/Visibility
+ ADD_DEFINITIONS(-fvisibility=hidden)
+ENDIF()
+
+IF(CMAKE_COMPILER_IS_GNUCXX)
+ ADD_DEFINITIONS(-Wsign-compare)
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
+IF(MSVC)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/cmake/msvc) #missing headers
+ ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501) #minimum version required is windows xp
+ ADD_DEFINITIONS(-DNOMINMAX) #disables stupidity and enables std::min and std::max
+ ADD_DEFINITIONS( #stop all kinds of compatibility warnings
+ -D_SCL_SECURE_NO_WARNINGS
+ -D_CRT_SECURE_NO_WARNINGS
+ -D_CRT_SECURE_NO_DEPRECATE
+ -D_CRT_NONSTDC_NO_DEPRECATE
+ )
+ LIST(APPEND GR_COMMON_FLAGS_AND_DEFINES -DHAVE_CONFIG_H)
+ ADD_DEFINITIONS(/MP) #build with multiple processors
+ENDIF(MSVC)
+
+########################################################################
+# Install directories
+########################################################################
+INCLUDE(GrPlatform) #define LIB_SUFFIX
+SET(GR_RUNTIME_DIR bin)
+SET(GR_LIBRARY_DIR lib${LIB_SUFFIX})
+SET(GR_INCLUDE_DIR include)
+SET(GR_DATA_DIR share)
+SET(GR_PKG_DATA_DIR ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME})
+SET(GR_DOC_DIR ${GR_DATA_DIR}/doc)
+SET(GR_PKG_DOC_DIR ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME}-${LIBVER})
+SET(GR_CONF_DIR etc)
+SET(GR_PKG_CONF_DIR ${GR_CONF_DIR}/${CMAKE_PROJECT_NAME})
+SET(GR_LIBEXEC_DIR libexec)
+SET(GR_PKG_LIBEXEC_DIR ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME})
+SET(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks)
+
+########################################################################
+# Variables replaced when configuring the package config files
+########################################################################
+FILE(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}" prefix)
+FILE(TO_NATIVE_PATH "\${prefix}" exec_prefix)
+FILE(TO_NATIVE_PATH "\${exec_prefix}/${GR_LIBRARY_DIR}" libdir)
+FILE(TO_NATIVE_PATH "\${prefix}/${GR_INCLUDE_DIR}" includedir)
+
+########################################################################
+# Create uninstall target
+########################################################################
+CONFIGURE_FILE(
+ ${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
+@ONLY)
+
+ADD_CUSTOM_TARGET(uninstall
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
+)
+
+########################################################################
+# Enable python component
+########################################################################
+FIND_PACKAGE(PythonLibs)
+FIND_PACKAGE(SWIG)
+INCLUDE(GrComponent)
+GR_REGISTER_COMPONENT("python-support" ENABLE_PYTHON
+ PYTHONLIBS_FOUND
+ SWIG_FOUND
+)
+
+FIND_PACKAGE(CppUnit)
+GR_REGISTER_COMPONENT("testing-support" ENABLE_TESTING
+ CPPUNIT_FOUND
+)
+
+########################################################################
+# Add optional dlls specified in DLL_PATHS
+########################################################################
+FOREACH(path ${DLL_PATHS})
+ FILE(GLOB _dlls "${path}/*.dll")
+ LIST(APPEND ALL_DLL_FILES ${_dlls})
+ENDFOREACH(path)
+IF(DEFINED ALL_DLL_FILES)
+ INCLUDE(GrPackage)
+ CPACK_COMPONENT("extra_dlls"
+ DISPLAY_NAME "Extra DLLs"
+ DESCRIPTION "Extra DLLs for runtime dependency requirements"
+ )
+ MESSAGE(STATUS "")
+ MESSAGE(STATUS "Including the following dlls into the install:")
+ FOREACH(_dll ${ALL_DLL_FILES})
+ MESSAGE(STATUS " ${_dll}")
+ ENDFOREACH(_dll)
+ INSTALL(FILES ${ALL_DLL_FILES} DESTINATION ${GR_RUNTIME_DIR} COMPONENT "extra_dlls")
+ENDIF()
+
+########################################################################
+# Setup volk as a subproject
+########################################################################
+ADD_SUBDIRECTORY(volk)
+SET(VOLK_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/volk/include
+ ${CMAKE_CURRENT_BINARY_DIR}/volk/include
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(gruel)
+ADD_SUBDIRECTORY(gnuradio-core)
+ADD_SUBDIRECTORY(grc)
+ADD_SUBDIRECTORY(docs)
+
+ADD_SUBDIRECTORY(gr-audio)
+SET(GR_DIGITAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/gr-digital/lib) #TODO move to gr-digital when ported
+SET(GR_DIGITAL_SWIG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/gr-digital/swig) #TODO move to gr-digital when ported
+ADD_SUBDIRECTORY(gr-noaa)
+ADD_SUBDIRECTORY(gr-pager)
+ADD_SUBDIRECTORY(gr-qtgui)
+ADD_SUBDIRECTORY(gr-trellis)
+ADD_SUBDIRECTORY(gr-uhd)
+ADD_SUBDIRECTORY(gr-wxgui)
+
+#finalize cpack after subdirs processed
+INCLUDE(GrPackage)
+CPACK_FINALIZE()
+
+########################################################################
+# Print summary
+########################################################################
+GR_PRINT_COMPONENT_SUMMARY()
+MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")
+MESSAGE(STATUS "Building for version: ${VERSION}")
diff --git a/cmake/Modules/CMakeParseArgumentsCopy.cmake b/cmake/Modules/CMakeParseArgumentsCopy.cmake
new file mode 100644
index 000000000..7ce4c49ae
--- /dev/null
+++ b/cmake/Modules/CMakeParseArgumentsCopy.cmake
@@ -0,0 +1,138 @@
+# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...)
+#
+# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for
+# parsing the arguments given to that macro or function.
+# It processes the arguments and defines a set of variables which hold the
+# values of the respective options.
+#
+# The <options> argument contains all options for the respective macro,
+# i.e. keywords which can be used when calling the macro without any value
+# following, like e.g. the OPTIONAL keyword of the install() command.
+#
+# The <one_value_keywords> argument contains all keywords for this macro
+# which are followed by one value, like e.g. DESTINATION keyword of the
+# install() command.
+#
+# The <multi_value_keywords> argument contains all keywords for this macro
+# which can be followed by more than one value, like e.g. the TARGETS or
+# FILES keywords of the install() command.
+#
+# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the
+# keywords listed in <options>, <one_value_keywords> and
+# <multi_value_keywords> a variable composed of the given <prefix>
+# followed by "_" and the name of the respective keyword.
+# These variables will then hold the respective value from the argument list.
+# For the <options> keywords this will be TRUE or FALSE.
+#
+# All remaining arguments are collected in a variable
+# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see whether
+# your macro was called with unrecognized parameters.
+#
+# As an example here a my_install() macro, which takes similar arguments as the
+# real install() command:
+#
+# function(MY_INSTALL)
+# set(options OPTIONAL FAST)
+# set(oneValueArgs DESTINATION RENAME)
+# set(multiValueArgs TARGETS CONFIGURATIONS)
+# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
+# ...
+#
+# Assume my_install() has been called like this:
+# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
+#
+# After the cmake_parse_arguments() call the macro will have set the following
+# variables:
+# MY_INSTALL_OPTIONAL = TRUE
+# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
+# MY_INSTALL_DESTINATION = "bin"
+# MY_INSTALL_RENAME = "" (was not used)
+# MY_INSTALL_TARGETS = "foo;bar"
+# MY_INSTALL_CONFIGURATIONS = "" (was not used)
+# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
+#
+# You can the continue and process these variables.
+#
+# Keywords terminate lists of values, e.g. if directly after a one_value_keyword
+# another recognized keyword follows, this is interpreted as the beginning of
+# the new option.
+# E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in
+# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would
+# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.
+
+#=============================================================================
+# Copyright 2010 Alexander Neundorf <neundorf@kde.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+
+if(__CMAKE_PARSE_ARGUMENTS_INCLUDED)
+ return()
+endif()
+set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE)
+
+
+function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames)
+ # first set all result variables to empty/FALSE
+ foreach(arg_name ${_singleArgNames} ${_multiArgNames})
+ set(${prefix}_${arg_name})
+ endforeach(arg_name)
+
+ foreach(option ${_optionNames})
+ set(${prefix}_${option} FALSE)
+ endforeach(option)
+
+ set(${prefix}_UNPARSED_ARGUMENTS)
+
+ set(insideValues FALSE)
+ set(currentArgName)
+
+ # now iterate over all arguments and fill the result variables
+ foreach(currentArg ${ARGN})
+ list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword
+ list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword
+ list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword
+
+ if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1)
+ if(insideValues)
+ if("${insideValues}" STREQUAL "SINGLE")
+ set(${prefix}_${currentArgName} ${currentArg})
+ set(insideValues FALSE)
+ elseif("${insideValues}" STREQUAL "MULTI")
+ list(APPEND ${prefix}_${currentArgName} ${currentArg})
+ endif()
+ else(insideValues)
+ list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
+ endif(insideValues)
+ else()
+ if(NOT ${optionIndex} EQUAL -1)
+ set(${prefix}_${currentArg} TRUE)
+ set(insideValues FALSE)
+ elseif(NOT ${singleArgIndex} EQUAL -1)
+ set(currentArgName ${currentArg})
+ set(${prefix}_${currentArgName})
+ set(insideValues "SINGLE")
+ elseif(NOT ${multiArgIndex} EQUAL -1)
+ set(currentArgName ${currentArg})
+ set(${prefix}_${currentArgName})
+ set(insideValues "MULTI")
+ endif()
+ endif()
+
+ endforeach(currentArg)
+
+ # propagate the result variables to the caller:
+ foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
+ set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
+ endforeach(arg_name)
+ set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
+
+endfunction(CMAKE_PARSE_ARGUMENTS _options _singleArgs _multiArgs)
diff --git a/cmake/Modules/FindALSA.cmake b/cmake/Modules/FindALSA.cmake
new file mode 100644
index 000000000..e3e6624ff
--- /dev/null
+++ b/cmake/Modules/FindALSA.cmake
@@ -0,0 +1,36 @@
+# - Try to find ALSA
+# Once done, this will define
+#
+# ALSA_FOUND - system has ALSA (GL and GLU)
+# ALSA_INCLUDE_DIRS - the ALSA include directories
+# ALSA_LIBRARIES - link these to use ALSA
+# ALSA_GL_LIBRARY - only GL
+# ALSA_GLU_LIBRARY - only GLU
+#
+# See documentation on how to write CMake scripts at
+# http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries
+
+include(LibFindMacros)
+
+libfind_pkg_check_modules(ALSA_PKGCONF alsa)
+
+find_path(ALSA_INCLUDE_DIR
+ NAMES alsa/version.h
+ PATHS ${ALSA_PKGCONF_INCLUDE_DIRS}
+)
+
+find_library(ALSA_LIBRARY
+ NAMES asound
+ PATHS ${ALSA_PKGCONF_LIBRARY_DIRS}
+)
+
+# Extract the version number
+IF(ALSA_INCLUDE_DIR)
+file(READ "${ALSA_INCLUDE_DIR}/alsa/version.h" _ALSA_VERSION_H_CONTENTS)
+string(REGEX REPLACE ".*#define SND_LIB_VERSION_STR[ \t]*\"([^\n]*)\".*" "\\1" ALSA_VERSION "${_ALSA_VERSION_H_CONTENTS}")
+ENDIF(ALSA_INCLUDE_DIR)
+
+set(ALSA_PROCESS_INCLUDES ALSA_INCLUDE_DIR)
+set(ALSA_PROCESS_LIBS ALSA_LIBRARY)
+libfind_process(ALSA)
+
diff --git a/cmake/Modules/FindCppUnit.cmake b/cmake/Modules/FindCppUnit.cmake
new file mode 100644
index 000000000..bb06c3c11
--- /dev/null
+++ b/cmake/Modules/FindCppUnit.cmake
@@ -0,0 +1,33 @@
+# http://www.cmake.org/pipermail/cmake/2006-October/011446.html
+#
+# Find the CppUnit includes and library
+#
+# This module defines
+# CPPUNIT_INCLUDE_DIRS, where to find tiff.h, etc.
+# CPPUNIT_LIBRARIES, the libraries to link against to use CppUnit.
+# CPPUNIT_FOUND, If false, do not try to use CppUnit.
+
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(CPPUNIT "cppunit")
+IF(NOT CPPUNIT_FOUND)
+
+FIND_PATH(CPPUNIT_INCLUDE_DIRS cppunit/TestCase.h
+ /usr/local/include
+ /usr/include
+)
+
+FIND_LIBRARY(CPPUNIT_LIBRARIES cppunit
+ ${CPPUNIT_INCLUDE_DIRS}/../lib
+ /usr/local/lib
+ /usr/lib)
+
+IF(CPPUNIT_INCLUDE_DIRS)
+ IF(CPPUNIT_LIBRARIES)
+ SET(CPPUNIT_FOUND "YES")
+ SET(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARIES} ${CMAKE_DL_LIBS})
+ ENDIF(CPPUNIT_LIBRARIES)
+ENDIF(CPPUNIT_INCLUDE_DIRS)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS)
+ENDIF(NOT CPPUNIT_FOUND)
diff --git a/cmake/Modules/FindFFTW3f.cmake b/cmake/Modules/FindFFTW3f.cmake
new file mode 100644
index 000000000..d84bb37a8
--- /dev/null
+++ b/cmake/Modules/FindFFTW3f.cmake
@@ -0,0 +1,32 @@
+# http://tim.klingt.org/code/projects/supernova/repository/revisions/d336dd6f400e381bcfd720e96139656de0c53b6a/entry/cmake_modules/FindFFTW3f.cmake
+# Find single-precision (float) version of FFTW3
+
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(FFTW3F "fftw3f >= 3.0")
+IF(NOT FFTW3F_FOUND)
+
+FIND_PATH(
+ FFTW3F_INCLUDE_DIRS
+ NAMES fftw3.h
+ HINTS $ENV{FFTW3_DIR}/include
+ PATHS /usr/local/include
+ /usr/include
+)
+
+FIND_LIBRARY(
+ FFTW3F_LIBRARIES
+ NAMES fftw3f libfftw3f
+ HINTS $ENV{FFTW3_DIR}/lib
+ PATHS /usr/local/lib
+ /usr/lib
+)
+
+SET(FFTW3F_FOUND "NO")
+
+IF( FFTW3F_INCLUDE_DIRS AND FFTW3F_LIBRARIES )
+ SET(FFTW3F_FOUND "YES")
+ENDIF()
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFTW3F DEFAULT_MSG FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS)
+ENDIF(NOT FFTW3F_FOUND)
diff --git a/cmake/Modules/FindGSL.cmake b/cmake/Modules/FindGSL.cmake
new file mode 100644
index 000000000..48fd0077f
--- /dev/null
+++ b/cmake/Modules/FindGSL.cmake
@@ -0,0 +1,143 @@
+# Try to find gnu scientific library GSL
+# See
+# http://www.gnu.org/software/gsl/ and
+# http://gnuwin32.sourceforge.net/packages/gsl.htm
+#
+# Based on a script of Felix Woelk and Jan Woetzel
+# (www.mip.informatik.uni-kiel.de)
+#
+# It defines the following variables:
+# GSL_FOUND - system has GSL lib
+# GSL_INCLUDE_DIRS - where to find headers
+# GSL_LIBRARIES - full path to the libraries
+# GSL_LIBRARY_DIRS, the directory where the PLplot library is found.
+
+# CMAKE_GSL_CXX_FLAGS = Unix compiler flags for GSL, essentially "`gsl-config --cxxflags`"
+# GSL_LINK_DIRECTORIES = link directories, useful for rpath on Unix
+# GSL_EXE_LINKER_FLAGS = rpath on Unix
+
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(GSL "gsl >= 1.10")
+IF(NOT GSL_FOUND)
+
+set( GSL_FOUND OFF )
+set( GSL_CBLAS_FOUND OFF )
+
+# Windows, but not for Cygwin and MSys where gsl-config is available
+if( WIN32 AND NOT CYGWIN AND NOT MSYS )
+ # look for headers
+ find_path( GSL_INCLUDE_DIR
+ NAMES gsl/gsl_cdf.h gsl/gsl_randist.h
+ )
+ if( GSL_INCLUDE_DIR )
+ # look for gsl library
+ find_library( GSL_LIBRARY
+ NAMES gsl
+ )
+ if( GSL_LIBRARY )
+ set( GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} )
+ get_filename_component( GSL_LIBRARY_DIRS ${GSL_LIBRARY} PATH )
+ set( GSL_FOUND ON )
+ endif( GSL_LIBRARY )
+
+ # look for gsl cblas library
+ find_library( GSL_CBLAS_LIBRARY
+ NAMES gslcblas
+ )
+ if( GSL_CBLAS_LIBRARY )
+ set( GSL_CBLAS_FOUND ON )
+ endif( GSL_CBLAS_LIBRARY )
+
+ set( GSL_LIBRARIES ${GSL_LIBRARY} ${GSL_CBLAS_LIBRARY} )
+ endif( GSL_INCLUDE_DIR )
+
+ #mark_as_advanced(
+ # GSL_INCLUDE_DIR
+ # GSL_LIBRARY
+ # GSL_CBLAS_LIBRARY
+ #)
+else( WIN32 AND NOT CYGWIN AND NOT MSYS )
+ if( UNIX OR MSYS )
+ find_program( GSL_CONFIG_EXECUTABLE gsl-config
+ /usr/bin/
+ /usr/local/bin
+ )
+
+ if( GSL_CONFIG_EXECUTABLE )
+ set( GSL_FOUND ON )
+
+ # run the gsl-config program to get cxxflags
+ execute_process(
+ COMMAND sh "${GSL_CONFIG_EXECUTABLE}" --cflags
+ OUTPUT_VARIABLE GSL_CFLAGS
+ RESULT_VARIABLE RET
+ ERROR_QUIET
+ )
+ if( RET EQUAL 0 )
+ string( STRIP "${GSL_CFLAGS}" GSL_CFLAGS )
+ separate_arguments( GSL_CFLAGS )
+
+ # parse definitions from cflags; drop -D* from CFLAGS
+ string( REGEX MATCHALL "-D[^;]+"
+ GSL_DEFINITIONS "${GSL_CFLAGS}" )
+ string( REGEX REPLACE "-D[^;]+;" ""
+ GSL_CFLAGS "${GSL_CFLAGS}" )
+
+ # parse include dirs from cflags; drop -I prefix
+ string( REGEX MATCHALL "-I[^;]+"
+ GSL_INCLUDE_DIRS "${GSL_CFLAGS}" )
+ string( REPLACE "-I" ""
+ GSL_INCLUDE_DIRS "${GSL_INCLUDE_DIRS}")
+ string( REGEX REPLACE "-I[^;]+;" ""
+ GSL_CFLAGS "${GSL_CFLAGS}")
+
+ message("GSL_DEFINITIONS=${GSL_DEFINITIONS}")
+ message("GSL_INCLUDE_DIRS=${GSL_INCLUDE_DIRS}")
+ message("GSL_CFLAGS=${GSL_CFLAGS}")
+ else( RET EQUAL 0 )
+ set( GSL_FOUND FALSE )
+ endif( RET EQUAL 0 )
+
+ # run the gsl-config program to get the libs
+ execute_process(
+ COMMAND sh "${GSL_CONFIG_EXECUTABLE}" --libs
+ OUTPUT_VARIABLE GSL_LIBRARIES
+ RESULT_VARIABLE RET
+ ERROR_QUIET
+ )
+ if( RET EQUAL 0 )
+ string(STRIP "${GSL_LIBRARIES}" GSL_LIBRARIES )
+ separate_arguments( GSL_LIBRARIES )
+
+ # extract linkdirs (-L) for rpath (i.e., LINK_DIRECTORIES)
+ string( REGEX MATCHALL "-L[^;]+"
+ GSL_LIBRARY_DIRS "${GSL_LIBRARIES}" )
+ string( REPLACE "-L" ""
+ GSL_LIBRARY_DIRS "${GSL_LIBRARY_DIRS}" )
+ else( RET EQUAL 0 )
+ set( GSL_FOUND FALSE )
+ endif( RET EQUAL 0 )
+
+ MARK_AS_ADVANCED(
+ GSL_CFLAGS
+ )
+ message( STATUS "Using GSL from ${GSL_PREFIX}" )
+ else( GSL_CONFIG_EXECUTABLE )
+ message( STATUS "FindGSL: gsl-config not found.")
+ endif( GSL_CONFIG_EXECUTABLE )
+ endif( UNIX OR MSYS )
+endif( WIN32 AND NOT CYGWIN AND NOT MSYS )
+
+if( GSL_FOUND )
+ if( NOT GSL_FIND_QUIETLY )
+ message( STATUS "FindGSL: Found both GSL headers and library" )
+ endif( NOT GSL_FIND_QUIETLY )
+else( GSL_FOUND )
+ if( GSL_FIND_REQUIRED )
+ message( FATAL_ERROR "FindGSL: Could not find GSL headers or library" )
+ endif( GSL_FIND_REQUIRED )
+endif( GSL_FOUND )
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSL DEFAULT_MSG GSL_LIBRARIES GSL_INCLUDE_DIRS)
+ENDIF(NOT GSL_FOUND)
diff --git a/cmake/Modules/FindGit.cmake b/cmake/Modules/FindGit.cmake
new file mode 100644
index 000000000..2d8214287
--- /dev/null
+++ b/cmake/Modules/FindGit.cmake
@@ -0,0 +1,46 @@
+# The module defines the following variables:
+# GIT_EXECUTABLE - path to git command line client
+# GIT_FOUND - true if the command line client was found
+# Example usage:
+# find_package(Git)
+# if(GIT_FOUND)
+# message("git found: ${GIT_EXECUTABLE}")
+# endif()
+
+#=============================================================================
+# Copyright 2010 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# Look for 'git' or 'eg' (easy git)
+#
+set(git_names git eg)
+
+# Prefer .cmd variants on Windows unless running in a Makefile
+# in the MSYS shell.
+#
+if(WIN32)
+ if(NOT CMAKE_GENERATOR MATCHES "MSYS")
+ set(git_names git.cmd git eg.cmd eg)
+ endif()
+endif()
+
+find_program(GIT_EXECUTABLE
+ NAMES ${git_names}
+ DOC "git command line client"
+ )
+mark_as_advanced(GIT_EXECUTABLE)
+
+# Handle the QUIETLY and REQUIRED arguments and set GIT_FOUND to TRUE if
+# all listed variables are TRUE
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Git DEFAULT_MSG GIT_EXECUTABLE)
diff --git a/cmake/Modules/FindJack.cmake b/cmake/Modules/FindJack.cmake
new file mode 100644
index 000000000..44417deb3
--- /dev/null
+++ b/cmake/Modules/FindJack.cmake
@@ -0,0 +1,87 @@
+# - Try to find jack-2.6
+# Once done this will define
+#
+# JACK_FOUND - system has jack
+# JACK_INCLUDE_DIRS - the jack include directory
+# JACK_LIBRARIES - Link these to use jack
+# JACK_DEFINITIONS - Compiler switches required for using jack
+#
+# Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
+# Modified for other libraries by Lasse Kärkkäinen <tronic>
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+if (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
+ # in cache already
+ set(JACK_FOUND TRUE)
+else (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+ include(UsePkgConfig)
+ pkgconfig(jack _JACK_INCLUDEDIR _JACK_LIBDIR _JACK_LDFLAGS _JACK_CFLAGS)
+ else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+ find_package(PkgConfig)
+ if (PKG_CONFIG_FOUND)
+ pkg_check_modules(_JACK jack)
+ endif (PKG_CONFIG_FOUND)
+ endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+ find_path(JACK_INCLUDE_DIR
+ NAMES
+ jack/jack.h
+ PATHS
+ ${_JACK_INCLUDEDIR}
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+ )
+
+ find_library(JACK_LIBRARY
+ NAMES
+ jack
+ PATHS
+ ${_JACK_LIBDIR}
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ if (JACK_LIBRARY)
+ set(JACK_FOUND TRUE)
+ endif (JACK_LIBRARY)
+
+ set(JACK_INCLUDE_DIRS
+ ${JACK_INCLUDE_DIR}
+ )
+
+ if (JACK_FOUND)
+ set(JACK_LIBRARIES
+ ${JACK_LIBRARIES}
+ ${JACK_LIBRARY}
+ )
+ endif (JACK_FOUND)
+
+ if (JACK_INCLUDE_DIRS AND JACK_LIBRARIES)
+ set(JACK_FOUND TRUE)
+ endif (JACK_INCLUDE_DIRS AND JACK_LIBRARIES)
+
+ if (JACK_FOUND)
+ if (NOT JACK_FIND_QUIETLY)
+ message(STATUS "Found jack: ${JACK_LIBRARY}")
+ endif (NOT JACK_FIND_QUIETLY)
+ else (JACK_FOUND)
+ if (JACK_FIND_REQUIRED)
+ message(FATAL_ERROR "Could not find JACK")
+ endif (JACK_FIND_REQUIRED)
+ endif (JACK_FOUND)
+
+ # show the JACK_INCLUDE_DIRS and JACK_LIBRARIES variables only in the advanced view
+ mark_as_advanced(JACK_INCLUDE_DIRS JACK_LIBRARIES)
+
+endif (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
+
diff --git a/cmake/Modules/FindOSS.cmake b/cmake/Modules/FindOSS.cmake
new file mode 100644
index 000000000..105b3ec9c
--- /dev/null
+++ b/cmake/Modules/FindOSS.cmake
@@ -0,0 +1,46 @@
+# - Find Oss
+# Find Oss headers and libraries.
+#
+# OSS_INCLUDE_DIR - where to find soundcard.h, etc.
+# OSS_FOUND - True if Oss found.
+
+
+FIND_PATH(LINUX_OSS_INCLUDE_DIR "linux/soundcard.h"
+ "/usr/include" "/usr/local/include"
+)
+
+FIND_PATH(SYS_OSS_INCLUDE_DIR "sys/soundcard.h"
+ "/usr/include" "/usr/local/include"
+)
+
+FIND_PATH(MACHINE_OSS_INCLUDE_DIR "machine/soundcard.h"
+ "/usr/include" "/usr/local/include"
+)
+
+SET(OSS_FOUND FALSE)
+
+IF(LINUX_OSS_INCLUDE_DIR)
+ SET(OSS_FOUND TRUE)
+ SET(OSS_INCLUDE_DIR ${LINUX_OSS_INCLUDE_DIR})
+ SET(HAVE_LINUX_SOUNDCARD_H 1)
+ENDIF()
+
+IF(SYS_OSS_INCLUDE_DIR)
+ SET(OSS_FOUND TRUE)
+ SET(OSS_INCLUDE_DIR ${SYS_OSS_INCLUDE_DIR})
+ SET(HAVE_SYS_SOUNDCARD_H 1)
+ENDIF()
+
+IF(MACHINE_OSS_INCLUDE_DIR)
+ SET(OSS_FOUND TRUE)
+ SET(OSS_INCLUDE_DIR ${MACHINE_OSS_INCLUDE_DIR})
+ SET(HAVE_MACHINE_SOUNDCARD_H 1)
+ENDIF()
+
+MARK_AS_ADVANCED (
+ OSS_FOUND
+ OSS_INCLUDE_DIR
+ LINUX_OSS_INCLUDE_DIR
+ SYS_OSS_INCLUDE_DIR
+ MACHINE_OSS_INCLUDE_DIR
+)
diff --git a/cmake/Modules/FindPortaudio.cmake b/cmake/Modules/FindPortaudio.cmake
new file mode 100644
index 000000000..158e20ee5
--- /dev/null
+++ b/cmake/Modules/FindPortaudio.cmake
@@ -0,0 +1,107 @@
+# - Try to find Portaudio
+# Once done this will define
+#
+# PORTAUDIO_FOUND - system has Portaudio
+# PORTAUDIO_INCLUDE_DIRS - the Portaudio include directory
+# PORTAUDIO_LIBRARIES - Link these to use Portaudio
+# PORTAUDIO_DEFINITIONS - Compiler switches required for using Portaudio
+# PORTAUDIO_VERSION - Portaudio version
+#
+# Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
+#
+# Redistribution and use is allowed according to the terms of the New BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+
+if (PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS)
+ # in cache already
+ set(PORTAUDIO_FOUND TRUE)
+else (PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS)
+ if (NOT WIN32)
+ include(FindPkgConfig)
+ pkg_check_modules(PORTAUDIO2 portaudio-2.0)
+ endif (NOT WIN32)
+
+ if (PORTAUDIO2_FOUND)
+ set(PORTAUDIO_INCLUDE_DIRS
+ ${PORTAUDIO2_INCLUDE_DIRS}
+ )
+ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set(PORTAUDIO_LIBRARIES "${PORTAUDIO2_LIBRARY_DIRS}/lib${PORTAUDIO2_LIBRARIES}.dylib")
+ else (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set(PORTAUDIO_LIBRARIES
+ ${PORTAUDIO2_LIBRARIES}
+ )
+ endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set(PORTAUDIO_VERSION
+ 19
+ )
+ set(PORTAUDIO_FOUND TRUE)
+ else (PORTAUDIO2_FOUND)
+ find_path(PORTAUDIO_INCLUDE_DIR
+ NAMES
+ portaudio.h
+ PATHS
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+ )
+
+ find_library(PORTAUDIO_LIBRARY
+ NAMES
+ portaudio
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ find_path(PORTAUDIO_LIBRARY_DIR
+ NAMES
+ portaudio
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ set(PORTAUDIO_INCLUDE_DIRS
+ ${PORTAUDIO_INCLUDE_DIR}
+ )
+ set(PORTAUDIO_LIBRARIES
+ ${PORTAUDIO_LIBRARY}
+ )
+
+ set(PORTAUDIO_LIBRARY_DIRS
+ ${PORTAUDIO_LIBRARY_DIR}
+ )
+
+ set(PORTAUDIO_VERSION
+ 18
+ )
+
+ if (PORTAUDIO_INCLUDE_DIRS AND PORTAUDIO_LIBRARIES)
+ set(PORTAUDIO_FOUND TRUE)
+ endif (PORTAUDIO_INCLUDE_DIRS AND PORTAUDIO_LIBRARIES)
+
+ if (PORTAUDIO_FOUND)
+ if (NOT Portaudio_FIND_QUIETLY)
+ message(STATUS "Found Portaudio: ${PORTAUDIO_LIBRARIES}")
+ endif (NOT Portaudio_FIND_QUIETLY)
+ else (PORTAUDIO_FOUND)
+ if (Portaudio_FIND_REQUIRED)
+ message(FATAL_ERROR "Could not find Portaudio")
+ endif (Portaudio_FIND_REQUIRED)
+ endif (PORTAUDIO_FOUND)
+ endif (PORTAUDIO2_FOUND)
+
+
+ # show the PORTAUDIO_INCLUDE_DIRS and PORTAUDIO_LIBRARIES variables only in the advanced view
+ mark_as_advanced(PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES)
+
+endif (PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS)
+
diff --git a/cmake/Modules/FindQwt.cmake b/cmake/Modules/FindQwt.cmake
new file mode 100644
index 000000000..698edc8b9
--- /dev/null
+++ b/cmake/Modules/FindQwt.cmake
@@ -0,0 +1,13 @@
+# - try to find Qwt libraries and include files
+# QWT_INCLUDE_DIR where to find qwt_plot.h, etc.
+# QWT_LIBRARIES libraries to link against
+# QWT_FOUND If false, do not try to use Qwt
+
+find_path ( QWT_INCLUDE_DIRS qwt_plot.h /usr/include/qwt-qt4 /usr/include/qwt )
+
+find_library ( QWT_LIBRARIES NAMES qwt-qt4 qwt)
+
+# handle the QUIETLY and REQUIRED arguments and set QWT_FOUND to TRUE if
+# all listed variables are TRUE
+include ( FindPackageHandleStandardArgs )
+find_package_handle_standard_args( Qwt DEFAULT_MSG QWT_LIBRARIES QWT_INCLUDE_DIRS )
diff --git a/cmake/Modules/FindUHD.cmake b/cmake/Modules/FindUHD.cmake
new file mode 100644
index 000000000..7e9f70aa9
--- /dev/null
+++ b/cmake/Modules/FindUHD.cmake
@@ -0,0 +1,24 @@
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(UHD uhd)
+IF(NOT UHD_FOUND)
+
+FIND_PATH(
+ UHD_INCLUDE_DIRS
+ NAMES uhd/config.hpp
+ HINTS $ENV{UHD_DIR}/include
+ PATHS /usr/local/include
+ /usr/include
+)
+
+FIND_LIBRARY(
+ UHD_LIBRARIES
+ NAMES uhd
+ HINTS $ENV{UHD_DIR}/lib
+ PATHS /usr/local/lib
+ /usr/lib
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(UHD DEFAULT_MSG UHD_LIBRARIES UHD_INCLUDE_DIRS)
+
+ENDIF(NOT UHD_FOUND)
diff --git a/cmake/Modules/GrBoost.cmake b/cmake/Modules/GrBoost.cmake
new file mode 100644
index 000000000..e045b58e2
--- /dev/null
+++ b/cmake/Modules/GrBoost.cmake
@@ -0,0 +1,54 @@
+# 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.
+
+IF(NOT DEFINED INCLUDED_GR_BOOST_CMAKE)
+SET(INCLUDED_GR_BOOST_CMAKE TRUE)
+
+########################################################################
+# Setup Boost and handle some system specific things
+########################################################################
+
+SET(BOOST_REQUIRED_COMPONENTS
+ date_time
+ program_options
+ filesystem
+ system
+ thread
+)
+
+IF(UNIX AND EXISTS "/usr/lib64")
+ LIST(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
+ENDIF(UNIX AND EXISTS "/usr/lib64")
+
+IF(MSVC)
+ IF (NOT DEFINED BOOST_ALL_DYN_LINK)
+ SET(BOOST_ALL_DYN_LINK TRUE)
+ ENDIF()
+ SET(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
+ IF(BOOST_ALL_DYN_LINK)
+ ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
+ ELSE(BOOST_ALL_DYN_LINK)
+ UNSET(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
+ ENDIF(BOOST_ALL_DYN_LINK)
+ENDIF(MSVC)
+
+SET(Boost_ADDITIONAL_VERSIONS "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44" "1.45.0" "1.45" "1.46.0" "1.46" "1.47.0" "1.47")
+FIND_PACKAGE(Boost "1.35" COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
+
+ENDIF(NOT DEFINED INCLUDED_GR_BOOST_CMAKE)
diff --git a/cmake/Modules/GrComponent.cmake b/cmake/Modules/GrComponent.cmake
new file mode 100644
index 000000000..0b4326a72
--- /dev/null
+++ b/cmake/Modules/GrComponent.cmake
@@ -0,0 +1,82 @@
+# 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.
+
+IF(NOT DEFINED INCLUDED_GR_COMPONENT_CMAKE)
+SET(INCLUDED_GR_COMPONENT_CMAKE TRUE)
+
+SET(_gr_enabled_components "" CACHE INTERNAL "" FORCE)
+SET(_gr_disabled_components "" CACHE INTERNAL "" FORCE)
+
+########################################################################
+# Register a component into the system
+# - name: canonical component name
+# - var: variable for enabled status
+# - argn: list of dependencies
+########################################################################
+FUNCTION(GR_REGISTER_COMPONENT name var)
+ INCLUDE(CMakeDependentOption)
+ MESSAGE(STATUS "")
+ MESSAGE(STATUS "Configuring ${name} support...")
+ FOREACH(dep ${ARGN})
+ MESSAGE(STATUS " Dependency ${dep} = ${${dep}}")
+ ENDFOREACH(dep)
+
+ #setup the dependent option for this component
+ CMAKE_DEPENDENT_OPTION(${var} "enable ${name} support" ON "${ARGN}" OFF)
+ SET(${var}_ "${${var}}" CACHE INTERNAL "" FORCE)
+
+ #append the component into one of the lists
+ IF(${var})
+ MESSAGE(STATUS " Enabling ${name} support.")
+ LIST(APPEND _gr_enabled_components ${name})
+ ELSE(${var})
+ MESSAGE(STATUS " Disabling ${name} support.")
+ LIST(APPEND _gr_disabled_components ${name})
+ ENDIF(${var})
+ MESSAGE(STATUS " Override with -D${var}=ON/OFF")
+
+ #make components lists into global variables
+ SET(_gr_enabled_components ${_gr_enabled_components} CACHE INTERNAL "" FORCE)
+ SET(_gr_disabled_components ${_gr_disabled_components} CACHE INTERNAL "" FORCE)
+ENDFUNCTION(GR_REGISTER_COMPONENT)
+
+########################################################################
+# Print the registered component summary
+########################################################################
+FUNCTION(GR_PRINT_COMPONENT_SUMMARY)
+ MESSAGE(STATUS "")
+ MESSAGE(STATUS "######################################################")
+ MESSAGE(STATUS "# Gnuradio enabled components ")
+ MESSAGE(STATUS "######################################################")
+ FOREACH(comp ${_gr_enabled_components})
+ MESSAGE(STATUS " * ${comp}")
+ ENDFOREACH(comp)
+
+ MESSAGE(STATUS "")
+ MESSAGE(STATUS "######################################################")
+ MESSAGE(STATUS "# Gnuradio disabled components ")
+ MESSAGE(STATUS "######################################################")
+ FOREACH(comp ${_gr_disabled_components})
+ MESSAGE(STATUS " * ${comp}")
+ ENDFOREACH(comp)
+
+ MESSAGE(STATUS "")
+ENDFUNCTION(GR_PRINT_COMPONENT_SUMMARY)
+
+ENDIF(NOT DEFINED INCLUDED_GR_COMPONENT_CMAKE)
diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake
new file mode 100644
index 000000000..d60217ca3
--- /dev/null
+++ b/cmake/Modules/GrMiscUtils.cmake
@@ -0,0 +1,100 @@
+# 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.
+
+IF(NOT DEFINED INCLUDED_GR_MISC_UTILS_CMAKE)
+SET(INCLUDED_GR_MISC_UTILS_CMAKE TRUE)
+
+########################################################################
+# Set global variable macro.
+# Used for subdirectories to export settings.
+# Example: include and library paths.
+########################################################################
+FUNCTION(GR_SET_GLOBAL var)
+ SET(${var} ${ARGN} CACHE INTERNAL "" FORCE)
+ENDFUNCTION(GR_SET_GLOBAL)
+
+########################################################################
+# Set the pre-processor definition if the condition is true.
+# - def the pre-processor definition to set and condition name
+########################################################################
+FUNCTION(GR_ADD_COND_DEF def)
+ IF(${def})
+ ADD_DEFINITIONS(-D${def})
+ ENDIF(${def})
+ENDFUNCTION(GR_ADD_COND_DEF)
+
+########################################################################
+# Check for a header and conditionally set a compile define.
+# - hdr the relative path to the header file
+# - def the pre-processor definition to set
+########################################################################
+FUNCTION(GR_CHECK_HDR_N_DEF hdr def)
+ INCLUDE(CheckIncludeFileCXX)
+ CHECK_INCLUDE_FILE_CXX(${hdr} ${def})
+ GR_ADD_COND_DEF(${def})
+ENDFUNCTION(GR_CHECK_HDR_N_DEF)
+
+########################################################################
+# Include subdirectory macro.
+# Sets the CMake directory variables,
+# includes the subdirectory CMakeLists.txt,
+# resets the CMake directory variables.
+#
+# This macro includes subdirectories rather than adding them
+# so that the subdirectory can affect variables in the level above.
+# This provides a work-around for the lack of convenience libraries.
+# This way a subdirectory can append to the list of library sources.
+########################################################################
+MACRO(GR_INCLUDE_SUBDIRECTORY subdir)
+ #insert the current directories on the front of the list
+ LIST(INSERT _cmake_source_dirs 0 ${CMAKE_CURRENT_SOURCE_DIR})
+ LIST(INSERT _cmake_binary_dirs 0 ${CMAKE_CURRENT_BINARY_DIR})
+
+ #set the current directories to the names of the subdirs
+ SET(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${subdir})
+ SET(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${subdir})
+
+ #include the subdirectory CMakeLists to run it
+ FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+ INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
+
+ #reset the value of the current directories
+ LIST(GET _cmake_source_dirs 0 CMAKE_CURRENT_SOURCE_DIR)
+ LIST(GET _cmake_binary_dirs 0 CMAKE_CURRENT_BINARY_DIR)
+
+ #pop the subdir names of the front of the list
+ LIST(REMOVE_AT _cmake_source_dirs 0)
+ LIST(REMOVE_AT _cmake_binary_dirs 0)
+ENDMACRO(GR_INCLUDE_SUBDIRECTORY)
+
+########################################################################
+# Create an always-built target with a unique name
+# Usage: GR_UNIQUE_TARGET(<description> <dependencies list>)
+########################################################################
+FUNCTION(GR_UNIQUE_TARGET desc)
+ INCLUDE(GrPython)
+ FILE(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+ EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib
+unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5]
+print re.sub('\\W', '_', '${desc} ${reldir} ' + unique)"
+ OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE)
+ ADD_CUSTOM_TARGET(${_target} ALL DEPENDS ${ARGN})
+ENDFUNCTION(GR_UNIQUE_TARGET)
+
+ENDIF(NOT DEFINED INCLUDED_GR_MISC_UTILS_CMAKE)
diff --git a/cmake/Modules/GrPackage.cmake b/cmake/Modules/GrPackage.cmake
new file mode 100644
index 000000000..1d03dff39
--- /dev/null
+++ b/cmake/Modules/GrPackage.cmake
@@ -0,0 +1,132 @@
+# 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.
+
+IF(NOT DEFINED INCLUDED_GR_PACKAGE_CMAKE)
+SET(INCLUDED_GR_PACKAGE_CMAKE TRUE)
+
+INCLUDE(GrVersion) #sets version information
+INCLUDE(GrPlatform) #sets platform information
+
+#set the cpack generator based on the platform type
+IF(CPACK_GENERATOR)
+ #already set by user
+ELSEIF(APPLE)
+ SET(CPACK_GENERATOR PackageMaker)
+ELSEIF(WIN32)
+ SET(CPACK_GENERATOR NSIS)
+ELSEIF(DEBIAN)
+ SET(CPACK_GENERATOR DEB)
+ELSEIF(REDHAT)
+ SET(CPACK_GENERATOR RPM)
+ELSE()
+ SET(CPACK_GENERATOR TGZ)
+ENDIF()
+
+########################################################################
+# CPACK_SET - set a global variable and record the variable name
+########################################################################
+FUNCTION(CPACK_SET var)
+ SET(${var} ${ARGN} CACHE INTERNAL "")
+ LIST(APPEND _cpack_vars ${var})
+ SET(_cpack_vars ${_cpack_vars} CACHE INTERNAL "")
+ENDFUNCTION(CPACK_SET)
+
+########################################################################
+# CPACK_FINALIZE - include cpack and the unset all the cpack variables
+########################################################################
+FUNCTION(CPACK_FINALIZE)
+ INCLUDE(CPack) #finalize the cpack settings configured throughout the build system
+ FOREACH(var ${_cpack_vars})
+ UNSET(${var} CACHE)
+ ENDFOREACH(var)
+ UNSET(_cpack_vars CACHE)
+ENDFUNCTION(CPACK_FINALIZE)
+
+########################################################################
+# CPACK_COMPONENT - convenience function to create a cpack component
+#
+# Usage: CPACK_COMPONENT(
+# name
+# [GROUP group]
+# [DISPLAY_NAME display_name]
+# [DESCRIPTION description]
+# [DEPENDS depends]
+# )
+########################################################################
+FUNCTION(CPACK_COMPONENT name)
+ INCLUDE(CMakeParseArgumentsCopy)
+ SET(_options GROUP DISPLAY_NAME DESCRIPTION DEPENDS)
+ CMAKE_PARSE_ARGUMENTS(CPACK_COMPONENT "" "${_options}" "" ${ARGN})
+
+ FOREACH(_option ${_options})
+ IF(CPACK_COMPONENT_${_option})
+ CPACK_SET(CPACK_COMPONENT_${name}_${_option} "${CPACK_COMPONENT_${_option}}")
+ ENDIF()
+ ENDFOREACH(_option)
+
+ CPACK_SET(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL};${name}")
+
+ENDFUNCTION(CPACK_COMPONENT)
+
+########################################################################
+# Setup CPack
+########################################################################
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GNU Radio")
+SET(CPACK_PACKAGE_VENDOR "Free Software Foundation, Inc.")
+SET(CPACK_PACKAGE_CONTACT "Discuss-gnuradio@gnu.org")
+SET(CPACK_PACKAGE_VERSION ${VERSION})
+SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/README)
+SET(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README)
+SET(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README)
+IF(${CPACK_GENERATOR} STREQUAL NSIS)
+ SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_PROJECT_NAME}")
+ENDIF()
+
+########################################################################
+# DEB package specific
+########################################################################
+SET(CPACK_DEBIAN_PACKAGE_DEPENDS
+ "libboost-all-dev"
+ "libfftw3-3"
+ "python"
+ "python-numpy"
+ "libqt4-core"
+ "libqwt5-qt4"
+ "libqwtplot3d-qt4-0"
+ "python-qt4"
+ "python-gtk2"
+ "python-lxml"
+ "python-Cheetah"
+)
+STRING(REPLACE ";" ", " CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}")
+SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${CMAKE_SOURCE_DIR}/debian/postinst ${CMAKE_SOURCE_DIR}/debian/prerm)
+
+########################################################################
+# RPM package specific
+########################################################################
+SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel") #TODO other packages
+
+########################################################################
+# NSIS package specific
+########################################################################
+SET(CPACK_NSIS_MODIFY_PATH ON)
+
+SET(HLKM_ENV "\\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\"")
+
+ENDIF(NOT DEFINED INCLUDED_GR_PACKAGE_CMAKE)
diff --git a/cmake/Modules/GrPlatform.cmake b/cmake/Modules/GrPlatform.cmake
new file mode 100644
index 000000000..0f4efe623
--- /dev/null
+++ b/cmake/Modules/GrPlatform.cmake
@@ -0,0 +1,46 @@
+# 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.
+
+IF(NOT DEFINED INCLUDED_GR_PLATFORM_CMAKE)
+SET(INCLUDED_GR_PLATFORM_CMAKE TRUE)
+
+########################################################################
+# Setup additional defines for OS types
+########################################################################
+IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ SET(LINUX TRUE)
+ENDIF()
+
+IF(LINUX AND EXISTS "/etc/debian_version")
+ SET(DEBIAN TRUE)
+ENDIF()
+
+IF(LINUX AND EXISTS "/etc/redhat-release")
+ SET(REDHAT TRUE)
+ENDIF()
+
+########################################################################
+# when the library suffix should be 64 (applies to redhat linux family)
+########################################################################
+IF(NOT DEFINED LIB_SUFFIX AND REDHAT AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$")
+ SET(LIB_SUFFIX 64)
+ENDIF()
+SET(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix")
+
+ENDIF(NOT DEFINED INCLUDED_GR_PLATFORM_CMAKE)
diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake
new file mode 100644
index 000000000..2f5f67916
--- /dev/null
+++ b/cmake/Modules/GrPython.cmake
@@ -0,0 +1,169 @@
+# 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.
+
+IF(NOT DEFINED INCLUDED_GR_PYTHON_CMAKE)
+SET(INCLUDED_GR_PYTHON_CMAKE TRUE)
+
+########################################################################
+# Setup the python interpreter:
+# This allows the user to specify a specific interpreter,
+# or finds the interpreter via the built-in cmake module.
+########################################################################
+#this allows the user to override PYTHON_EXECUTABLE
+IF(PYTHON_EXECUTABLE)
+
+ SET(PYTHONINTERP_FOUND TRUE)
+
+#otherwise if not set, try to automatically find it
+ELSE(PYTHON_EXECUTABLE)
+
+ #use the built-in find script
+ FIND_PACKAGE(PythonInterp)
+
+ #and if that fails use the find program routine
+ IF(NOT PYTHONINTERP_FOUND)
+ FIND_PROGRAM(PYTHON_EXECUTABLE NAMES python python2.7 python2.6 python2.5)
+ IF(PYTHON_EXECUTABLE)
+ SET(PYTHONINTERP_FOUND TRUE)
+ ENDIF(PYTHON_EXECUTABLE)
+ ENDIF(NOT PYTHONINTERP_FOUND)
+
+ENDIF(PYTHON_EXECUTABLE)
+
+#make the path to the executable appear in the cmake gui
+SET(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter")
+
+IF(NOT PYTHONINTERP_FOUND)
+ MESSAGE(FATAL_ERROR "Error: Python interpretor required by the build system.")
+ENDIF(NOT PYTHONINTERP_FOUND)
+
+########################################################################
+# Check for the existence of a python module:
+# - desc a string description of the check
+# - mod the name of the module to import
+# - cmd an additional command to run
+# - have the result variable to set
+########################################################################
+MACRO(GR_PYTHON_CHECK_MODULE desc mod cmd have)
+ MESSAGE(STATUS "")
+ MESSAGE(STATUS "Python checking for ${desc}")
+ EXECUTE_PROCESS(
+ COMMAND ${PYTHON_EXECUTABLE} -c "
+#########################################
+try: import ${mod}
+except: exit(-1)
+try: assert ${cmd}
+except: exit(-1)
+#########################################"
+ RESULT_VARIABLE ${have}
+ )
+ IF(${have} EQUAL 0)
+ MESSAGE(STATUS "Python checking for ${desc} - found")
+ SET(${have} TRUE)
+ ELSE(${have} EQUAL 0)
+ MESSAGE(STATUS "Python checking for ${desc} - not found")
+ SET(${have} FALSE)
+ ENDIF(${have} EQUAL 0)
+ENDMACRO(GR_PYTHON_CHECK_MODULE)
+
+########################################################################
+# Sets the python installation directory GR_PYTHON_DIR
+########################################################################
+EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
+from distutils import sysconfig
+print sysconfig.get_python_lib(prefix='')
+" OUTPUT_VARIABLE GR_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+FILE(TO_CMAKE_PATH ${GR_PYTHON_DIR} GR_PYTHON_DIR)
+
+########################################################################
+# Install python sources (also builds and installs byte-compiled python)
+########################################################################
+FUNCTION(GR_PYTHON_INSTALL)
+ INCLUDE(CMakeParseArgumentsCopy)
+ CMAKE_PARSE_ARGUMENTS(GR_PYTHON_INSTALL "" "DESTINATION;COMPONENT" "FILES;PROGRAMS" ${ARGN})
+
+ ####################################################################
+ IF(GR_PYTHON_INSTALL_FILES)
+ ####################################################################
+ INSTALL(${ARGN}) #installs regular python files
+
+ FOREACH(pyfile ${GR_PYTHON_INSTALL_FILES})
+ GET_FILENAME_COMPONENT(pyfile_name ${pyfile} NAME)
+ GET_FILENAME_COMPONENT(pyfile ${pyfile} ABSOLUTE)
+ STRING(REPLACE "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" pycfile "${pyfile}c")
+ LIST(APPEND python_install_gen_targets ${pycfile})
+
+ GET_FILENAME_COMPONENT(pycfile_path ${pycfile} PATH)
+ FILE(MAKE_DIRECTORY ${pycfile_path})
+
+ #create a command to generate the byte-compiled pyc file
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${pycfile} DEPENDS ${pyfile}
+ COMMAND ${PYTHON_EXECUTABLE} -c
+ \"import py_compile\; py_compile.compile(file='${pyfile}', cfile='${pycfile}', doraise=True)\"
+ COMMENT "Byte-compiling ${pyfile_name}"
+ )
+ INSTALL(FILES ${pycfile}
+ DESTINATION ${GR_PYTHON_INSTALL_DESTINATION}
+ COMPONENT ${GR_PYTHON_INSTALL_COMPONENT}
+ )
+ ENDFOREACH(pyfile)
+
+ ####################################################################
+ ELSEIF(GR_PYTHON_INSTALL_PROGRAMS)
+ ####################################################################
+ FILE(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} pyexe_native)
+
+ FOREACH(pyfile ${GR_PYTHON_INSTALL_PROGRAMS})
+ GET_FILENAME_COMPONENT(pyfile_name ${pyfile} NAME)
+ GET_FILENAME_COMPONENT(pyfile ${pyfile} ABSOLUTE)
+ STRING(REPLACE "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" pyexefile "${pyfile}.exe")
+ LIST(APPEND python_install_gen_targets ${pyexefile})
+
+ GET_FILENAME_COMPONENT(pyexefile_path ${pyexefile} PATH)
+ FILE(MAKE_DIRECTORY ${pyexefile_path})
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${pyexefile} DEPENDS ${pyfile}
+ COMMAND ${PYTHON_EXECUTABLE} -c
+ \"open('${pyexefile}', 'w').write('\#!${pyexe_native}\\n'+open('${pyfile}').read())\"
+ COMMENT "Shebangin ${pyfile_name}"
+ )
+
+ #on windows, python files need an extension to execute
+ GET_FILENAME_COMPONENT(pyfile_ext ${pyfile} EXT)
+ IF(WIN32 AND NOT pyfile_ext)
+ SET(pyfile_name "${pyfile_name}.py")
+ ENDIF()
+
+ INSTALL(PROGRAMS ${pyexefile} RENAME ${pyfile_name}
+ DESTINATION ${GR_PYTHON_INSTALL_DESTINATION}
+ COMPONENT ${GR_PYTHON_INSTALL_COMPONENT}
+ )
+ ENDFOREACH(pyfile)
+
+ ENDIF()
+
+ INCLUDE(GrMiscUtils) #unique target
+ GR_UNIQUE_TARGET("pygen" ${python_install_gen_targets})
+
+ENDFUNCTION(GR_PYTHON_INSTALL)
+
+ENDIF(NOT DEFINED INCLUDED_GR_PYTHON_CMAKE)
diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake
new file mode 100644
index 000000000..f32bf10cc
--- /dev/null
+++ b/cmake/Modules/GrSwig.cmake
@@ -0,0 +1,90 @@
+# 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.
+
+IF(NOT DEFINED INCLUDED_GR_SWIG_CMAKE)
+SET(INCLUDED_GR_SWIG_CMAKE TRUE)
+
+########################################################################
+# Build a swig target for the common gnuradio use case. Usage:
+# GR_SWIG_MAKE(target ifile ifile ifile...)
+#
+# Set the following variables before calling:
+# - GR_SWIG_FLAGS
+# - GR_SWIG_INCLUDE_DIRS
+# - GR_SWIG_LIBRARIES
+# - GR_SWIG_SOURCE_DEPS
+# - GR_SWIG_TARGET_DEPS
+########################################################################
+MACRO(GR_SWIG_MAKE name)
+ SET(ifiles ${ARGN})
+
+ INCLUDE_DIRECTORIES(${GR_SWIG_INCLUDE_DIRS})
+ SET(SWIG_MODULE_${name}_EXTRA_DEPS ${GR_SWIG_SOURCE_DEPS})
+
+ FIND_PACKAGE(PythonLibs)
+ INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
+
+ #setup the swig flags with flags and include directories
+ SET(CMAKE_SWIG_FLAGS -fvirtual -modern -keyword -w511 -module ${name} ${GR_SWIG_FLAGS})
+ FOREACH(dir ${GR_SWIG_INCLUDE_DIRS})
+ LIST(APPEND CMAKE_SWIG_FLAGS "-I${dir}")
+ ENDFOREACH(dir)
+
+ #set the C++ property on the swig .i file so it builds
+ SET_SOURCE_FILES_PROPERTIES(${ifiles} PROPERTIES CPLUSPLUS ON)
+
+ #setup the actual swig library target to be built
+ INCLUDE(UseSWIG)
+ SWIG_ADD_MODULE(${name} python ${ifiles})
+ SWIG_LINK_LIBRARIES(${name} ${PYTHON_LIBRARIES} ${GR_SWIG_LIBRARIES})
+ IF(GR_SWIG_TARGET_DEPS)
+ ADD_DEPENDENCIES(${SWIG_MODULE_${name}_REAL_NAME} ${GR_SWIG_TARGET_DEPS})
+ ENDIF(GR_SWIG_TARGET_DEPS)
+
+ENDMACRO(GR_SWIG_MAKE)
+
+########################################################################
+# Install swig targets generated by GR_SWIG_MAKE. Usage:
+# GR_SWIG_INSTALL(
+# TARGETS target target target...
+# [DESTINATION destination]
+# [COMPONENT component]
+# )
+########################################################################
+MACRO(GR_SWIG_INSTALL)
+
+ INCLUDE(CMakeParseArgumentsCopy)
+ CMAKE_PARSE_ARGUMENTS(GR_SWIG_INSTALL "" "DESTINATION;COMPONENT" "TARGETS" ${ARGN})
+
+ FOREACH(name ${GR_SWIG_INSTALL_TARGETS})
+ INSTALL(TARGETS ${SWIG_MODULE_${name}_REAL_NAME}
+ DESTINATION ${GR_SWIG_INSTALL_DESTINATION}
+ COMPONENT ${GR_SWIG_INSTALL_COMPONENT}
+ )
+
+ INCLUDE(GrPython)
+ GR_PYTHON_INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}.py
+ DESTINATION ${GR_SWIG_INSTALL_DESTINATION}
+ COMPONENT ${GR_SWIG_INSTALL_COMPONENT}
+ )
+ ENDFOREACH(name)
+
+ENDMACRO(GR_SWIG_INSTALL)
+
+ENDIF(NOT DEFINED INCLUDED_GR_SWIG_CMAKE)
diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake
new file mode 100644
index 000000000..707c0c452
--- /dev/null
+++ b/cmake/Modules/GrTest.cmake
@@ -0,0 +1,111 @@
+# 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.
+
+IF(NOT DEFINED INCLUDED_GR_TEST_CMAKE)
+SET(INCLUDED_GR_TEST_CMAKE TRUE)
+
+########################################################################
+# Add a unit test and setup the environment for a unit test.
+# Takes the same arguments as the ADD_TEST function.
+#
+# Before calling set the following variables:
+# GR_TEST_TARGET_DEPS - built targets for the library path
+# GR_TEST_LIBRARY_DIRS - directories for the library path
+# GR_TEST_PYTHON_DIRS - directories for the python path
+########################################################################
+FUNCTION(GR_ADD_TEST test_name)
+
+ IF(WIN32)
+ #Ensure that the build exe also appears in the PATH.
+ LIST(APPEND GR_TEST_TARGET_DEPS ${ARGN})
+
+ #In the land of windows, all libraries must be in the PATH.
+ #Since the dependent libraries are not yet installed,
+ #we must manually set them in the PATH to run tests.
+ #The following appends the path of a target dependency.
+ FOREACH(target ${GR_TEST_TARGET_DEPS})
+ GET_TARGET_PROPERTY(location ${target} LOCATION)
+ IF(location)
+ GET_FILENAME_COMPONENT(path ${location} PATH)
+ STRING(REGEX REPLACE "\\$\\(.*\\)" ${CMAKE_BUILD_TYPE} path ${path})
+ LIST(APPEND GR_TEST_LIBRARY_DIRS ${path})
+ ENDIF(location)
+ ENDFOREACH(target)
+
+ #SWIG generates the python library files into a subdirectory.
+ #Therefore, we must append this subdirectory into PYTHONPATH.
+ #Only do this for the python directories ending with "swig".
+ FOREACH(pydir ${GR_TEST_PYTHON_DIRS})
+ GET_FILENAME_COMPONENT(name ${pydir} NAME)
+ IF(name MATCHES "^(swig|lib)$")
+ LIST(APPEND GR_TEST_PYTHON_DIRS ${pydir}/${CMAKE_BUILD_TYPE})
+ ENDIF()
+ ENDFOREACH(pydir)
+ ENDIF(WIN32)
+
+ FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} srcdir)
+ FILE(TO_NATIVE_PATH "${GR_TEST_LIBRARY_DIRS}" libpath) #ok to use on dir list?
+ FILE(TO_NATIVE_PATH "${GR_TEST_PYTHON_DIRS}" pypath) #ok to use on dir list?
+
+ SET(environs "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}")
+
+ #http://www.cmake.org/pipermail/cmake/2009-May/029464.html
+
+ IF(UNIX)
+ #set both LD and DYLD paths to cover multiple UNIX OS library paths
+ LIST(APPEND libpath "$LD_LIBRARY_PATH" "$DYLD_LIBRARY_PATH")
+ LIST(APPEND pypath "$PYTHONPATH")
+
+ #replace list separator with the path separator
+ STRING(REPLACE ";" ":" libpath "${libpath}")
+ STRING(REPLACE ";" ":" pypath "${pypath}")
+ LIST(APPEND environs "LD_LIBRARY_PATH=${libpath}" "DYLD_LIBRARY_PATH=${libpath}" "PYTHONPATH=${pypath}")
+
+ ADD_TEST(${ARGV})
+ SET_TESTS_PROPERTIES(${test_name} PROPERTIES ENVIRONMENT "${environs}")
+ ENDIF(UNIX)
+
+ IF(WIN32)
+ LIST(APPEND libpath ${DLL_PATHS} "%PATH%")
+ LIST(APPEND pypath "%PYTHONPATH%")
+
+ #replace list separator with the path separator (escaped)
+ STRING(REPLACE ";" "\\;" libpath "${libpath}")
+ STRING(REPLACE ";" "\\;" pypath "${pypath}")
+ LIST(APPEND environs "PATH=${libpath}" "PYTHONPATH=${pypath}")
+
+ #generate a bat file that sets the environment and runs the test
+ SET(bat_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.bat)
+ FILE(WRITE ${bat_file} "@echo off\n")
+ #each line sets an environment variable
+ FOREACH(environ ${environs})
+ FILE(APPEND ${bat_file} "SET ${environ}\n")
+ ENDFOREACH(environ)
+ #load the command to run with its arguments
+ FOREACH(arg ${ARGN})
+ FILE(APPEND ${bat_file} "${arg} ")
+ ENDFOREACH(arg)
+ FILE(APPEND ${bat_file} "\n")
+
+ ADD_TEST(${test_name} ${bat_file})
+ ENDIF(WIN32)
+
+ENDFUNCTION(GR_ADD_TEST)
+
+ENDIF(NOT DEFINED INCLUDED_GR_TEST_CMAKE)
diff --git a/cmake/Modules/GrVersion.cmake b/cmake/Modules/GrVersion.cmake
new file mode 100644
index 000000000..556495336
--- /dev/null
+++ b/cmake/Modules/GrVersion.cmake
@@ -0,0 +1,60 @@
+# 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.
+
+IF(NOT DEFINED INCLUDED_GR_VERSION_CMAKE)
+SET(INCLUDED_GR_VERSION_CMAKE TRUE)
+
+########################################################################
+# Setup version variables.
+# Parse the output of git describe
+# sets VERSION and LIBVER
+########################################################################
+
+FIND_PACKAGE(Git)
+IF(GIT_FOUND)
+ MESSAGE(STATUS "Extracting version information from git...")
+ EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe
+ OUTPUT_VARIABLE VERSION OUTPUT_STRIP_TRAILING_WHITESPACE
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ )
+ IF(NOT VERSION)
+ MESSAGE(WARNING "Tried to extract $VERSION from git describe but failed... using default")
+ ENDIF()
+
+ INCLUDE(GrPython)
+ EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import re; print re.match('^v(\\d+\\.\\d+\\.\\d+)', '${VERSION}').groups()[0]"
+ OUTPUT_VARIABLE LIBVER OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ IF(NOT LIBVER)
+ MESSAGE(WARNING "Tried to extract $LIBVER from $VERSION but failed... using default")
+ ENDIF()
+ENDIF(GIT_FOUND)
+
+#ensure that the version strings are set no matter what
+IF(NOT VERSION)
+ SET(VERSION "v3.x.x-unknown")
+ENDIF()
+
+IF(NOT LIBVER)
+ SET(LIBVER "3.x.x")
+ENDIF()
+
+MESSAGE(STATUS "VERSION: ${VERSION}, LIBVER: ${LIBVER}")
+
+ENDIF(NOT DEFINED INCLUDED_GR_VERSION_CMAKE)
diff --git a/cmake/Modules/LibFindMacros.cmake b/cmake/Modules/LibFindMacros.cmake
new file mode 100644
index 000000000..69975c51b
--- /dev/null
+++ b/cmake/Modules/LibFindMacros.cmake
@@ -0,0 +1,99 @@
+# Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments
+# used for the current package. For this to work, the first parameter must be the
+# prefix of the current package, then the prefix of the new package etc, which are
+# passed to find_package.
+macro (libfind_package PREFIX)
+ set (LIBFIND_PACKAGE_ARGS ${ARGN})
+ if (${PREFIX}_FIND_QUIETLY)
+ set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} QUIET)
+ endif (${PREFIX}_FIND_QUIETLY)
+ if (${PREFIX}_FIND_REQUIRED)
+ set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED)
+ endif (${PREFIX}_FIND_REQUIRED)
+ find_package(${LIBFIND_PACKAGE_ARGS})
+endmacro (libfind_package)
+
+# CMake developers made the UsePkgConfig system deprecated in the same release (2.6)
+# where they added pkg_check_modules. Consequently I need to support both in my scripts
+# to avoid those deprecated warnings. Here's a helper that does just that.
+# Works identically to pkg_check_modules, except that no checks are needed prior to use.
+macro (libfind_pkg_check_modules PREFIX PKGNAME)
+ if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+ include(UsePkgConfig)
+ pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS)
+ else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+ find_package(PkgConfig)
+ if (PKG_CONFIG_FOUND)
+ pkg_check_modules(${PREFIX} ${PKGNAME})
+ endif (PKG_CONFIG_FOUND)
+ endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
+endmacro (libfind_pkg_check_modules)
+
+# Do the final processing once the paths have been detected.
+# If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain
+# all the variables, each of which contain one include directory.
+# Ditto for ${PREFIX}_PROCESS_LIBS and library files.
+# Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES.
+# Also handles errors in case library detection was required, etc.
+macro (libfind_process PREFIX)
+ # Skip processing if already processed during this run
+ if (NOT ${PREFIX}_FOUND)
+ # Start with the assumption that the library was found
+ set (${PREFIX}_FOUND TRUE)
+
+ # Process all includes and set _FOUND to false if any are missing
+ foreach (i ${${PREFIX}_PROCESS_INCLUDES})
+ if (${i})
+ set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}})
+ mark_as_advanced(${i})
+ else (${i})
+ set (${PREFIX}_FOUND FALSE)
+ endif (${i})
+ endforeach (i)
+
+ # Process all libraries and set _FOUND to false if any are missing
+ foreach (i ${${PREFIX}_PROCESS_LIBS})
+ if (${i})
+ set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}})
+ mark_as_advanced(${i})
+ else (${i})
+ set (${PREFIX}_FOUND FALSE)
+ endif (${i})
+ endforeach (i)
+
+ # Print message and/or exit on fatal error
+ if (${PREFIX}_FOUND)
+ if (NOT ${PREFIX}_FIND_QUIETLY)
+ message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}")
+ endif (NOT ${PREFIX}_FIND_QUIETLY)
+ else (${PREFIX}_FOUND)
+ if (${PREFIX}_FIND_REQUIRED)
+ foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS})
+ message("${i}=${${i}}")
+ endforeach (i)
+ message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.")
+ endif (${PREFIX}_FIND_REQUIRED)
+ endif (${PREFIX}_FOUND)
+ endif (NOT ${PREFIX}_FOUND)
+endmacro (libfind_process)
+
+macro(libfind_library PREFIX basename)
+ set(TMP "")
+ if(MSVC80)
+ set(TMP -vc80)
+ endif(MSVC80)
+ if(MSVC90)
+ set(TMP -vc90)
+ endif(MSVC90)
+ set(${PREFIX}_LIBNAMES ${basename}${TMP})
+ if(${ARGC} GREATER 2)
+ set(${PREFIX}_LIBNAMES ${basename}${TMP}-${ARGV2})
+ string(REGEX REPLACE "\\." "_" TMP ${${PREFIX}_LIBNAMES})
+ set(${PREFIX}_LIBNAMES ${${PREFIX}_LIBNAMES} ${TMP})
+ endif(${ARGC} GREATER 2)
+ find_library(${PREFIX}_LIBRARY
+ NAMES ${${PREFIX}_LIBNAMES}
+ PATHS ${${PREFIX}_PKGCONF_LIBRARY_DIRS}
+ )
+endmacro(libfind_library)
+
diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in
new file mode 100644
index 000000000..6031a6ca9
--- /dev/null
+++ b/cmake/cmake_uninstall.cmake.in
@@ -0,0 +1,23 @@
+# http://www.vtk.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
+
+IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+ MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
+ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+
+FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
+STRING(REGEX REPLACE "\n" ";" files "${files}")
+FOREACH(file ${files})
+ MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
+ IF(EXISTS "$ENV{DESTDIR}${file}")
+ EXEC_PROGRAM(
+ "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
+ OUTPUT_VARIABLE rm_out
+ RETURN_VALUE rm_retval
+ )
+ IF(NOT "${rm_retval}" STREQUAL 0)
+ MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
+ ENDIF(NOT "${rm_retval}" STREQUAL 0)
+ ELSE(EXISTS "$ENV{DESTDIR}${file}")
+ MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
+ ENDIF(EXISTS "$ENV{DESTDIR}${file}")
+ENDFOREACH(file)
diff --git a/cmake/msvc/config.h b/cmake/msvc/config.h
new file mode 100644
index 000000000..71e94c832
--- /dev/null
+++ b/cmake/msvc/config.h
@@ -0,0 +1,55 @@
+#ifndef _MSC_VER // [
+#error "Use this header only with Microsoft Visual C++ compilers!"
+#endif // _MSC_VER ]
+
+#ifndef _MSC_CONFIG_H_ // [
+#define _MSC_CONFIG_H_
+
+////////////////////////////////////////////////////////////////////////
+// enable inline functions for C code
+////////////////////////////////////////////////////////////////////////
+#ifndef __cplusplus
+# define inline __inline
+#endif
+
+////////////////////////////////////////////////////////////////////////
+// signed size_t
+////////////////////////////////////////////////////////////////////////
+#include <stddef.h>
+typedef ptrdiff_t ssize_t;
+
+////////////////////////////////////////////////////////////////////////
+// rint functions
+////////////////////////////////////////////////////////////////////////
+static inline long lrint(double x){return (long)(x > 0.0 ? x + 0.5 : x - 0.5);}
+static inline long lrintf(float x){return (long)(x > 0.0f ? x + 0.5f : x - 0.5f);}
+static inline double rint(double x){return (double)lrint(x);}
+static inline float rintf(float x){return (float)lrintf(x);}
+
+////////////////////////////////////////////////////////////////////////
+// math constants
+////////////////////////////////////////////////////////////////////////
+#define INFINITY HUGE_VAL
+
+# define M_E 2.7182818284590452354 /* e */
+# define M_LOG2E 1.4426950408889634074 /* log_2 e */
+# define M_LOG10E 0.43429448190325182765 /* log_10 e */
+# define M_LN2 0.69314718055994530942 /* log_e 2 */
+# define M_LN10 2.30258509299404568402 /* log_e 10 */
+# define M_PI 3.14159265358979323846 /* pi */
+# define M_PI_2 1.57079632679489661923 /* pi/2 */
+# define M_PI_4 0.78539816339744830962 /* pi/4 */
+# define M_1_PI 0.31830988618379067154 /* 1/pi */
+# define M_2_PI 0.63661977236758134308 /* 2/pi */
+# define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
+# define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
+# define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
+
+////////////////////////////////////////////////////////////////////////
+// random and srandom
+////////////////////////////////////////////////////////////////////////
+#include <stdlib.h>
+static inline long int random (void) { return rand(); }
+static inline void srandom (unsigned int seed) { srand(seed); }
+
+#endif // _MSC_CONFIG_H_ ]
diff --git a/cmake/msvc/inttypes.h b/cmake/msvc/inttypes.h
new file mode 100644
index 000000000..1c2baa82e
--- /dev/null
+++ b/cmake/msvc/inttypes.h
@@ -0,0 +1,301 @@
+// ISO C9x compliant inttypes.h for Microsoft Visual Studio
+// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
+//
+// Copyright (c) 2006 Alexander Chemeris
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. The name of the author may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _MSC_VER // [
+#error "Use this header only with Microsoft Visual C++ compilers!"
+#endif // _MSC_VER ]
+
+#ifndef _MSC_INTTYPES_H_ // [
+#define _MSC_INTTYPES_H_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif
+
+#include <stdint.h>
+
+// 7.8 Format conversion of integer types
+
+typedef struct {
+ intmax_t quot;
+ intmax_t rem;
+} imaxdiv_t;
+
+// 7.8.1 Macros for format specifiers
+
+// The fprintf macros for signed integers are:
+#define PRId8 "d"
+#define PRIi8 "i"
+#define PRIdLEAST8 "d"
+#define PRIiLEAST8 "i"
+#define PRIdFAST8 "d"
+#define PRIiFAST8 "i"
+
+#define PRId16 "hd"
+#define PRIi16 "hi"
+#define PRIdLEAST16 "hd"
+#define PRIiLEAST16 "hi"
+#define PRIdFAST16 "hd"
+#define PRIiFAST16 "hi"
+
+#define PRId32 "I32d"
+#define PRIi32 "I32i"
+#define PRIdLEAST32 "I32d"
+#define PRIiLEAST32 "I32i"
+#define PRIdFAST32 "I32d"
+#define PRIiFAST32 "I32i"
+
+#define PRId64 "I64d"
+#define PRIi64 "I64i"
+#define PRIdLEAST64 "I64d"
+#define PRIiLEAST64 "I64i"
+#define PRIdFAST64 "I64d"
+#define PRIiFAST64 "I64i"
+
+#define PRIdMAX "I64d"
+#define PRIiMAX "I64i"
+
+#define PRIdPTR "Id"
+#define PRIiPTR "Ii"
+
+// The fprintf macros for unsigned integers are:
+#define PRIo8 "o"
+#define PRIu8 "u"
+#define PRIx8 "x"
+#define PRIX8 "X"
+#define PRIoLEAST8 "o"
+#define PRIuLEAST8 "u"
+#define PRIxLEAST8 "x"
+#define PRIXLEAST8 "X"
+#define PRIoFAST8 "o"
+#define PRIuFAST8 "u"
+#define PRIxFAST8 "x"
+#define PRIXFAST8 "X"
+
+#define PRIo16 "ho"
+#define PRIu16 "hu"
+#define PRIx16 "hx"
+#define PRIX16 "hX"
+#define PRIoLEAST16 "ho"
+#define PRIuLEAST16 "hu"
+#define PRIxLEAST16 "hx"
+#define PRIXLEAST16 "hX"
+#define PRIoFAST16 "ho"
+#define PRIuFAST16 "hu"
+#define PRIxFAST16 "hx"
+#define PRIXFAST16 "hX"
+
+#define PRIo32 "I32o"
+#define PRIu32 "I32u"
+#define PRIx32 "I32x"
+#define PRIX32 "I32X"
+#define PRIoLEAST32 "I32o"
+#define PRIuLEAST32 "I32u"
+#define PRIxLEAST32 "I32x"
+#define PRIXLEAST32 "I32X"
+#define PRIoFAST32 "I32o"
+#define PRIuFAST32 "I32u"
+#define PRIxFAST32 "I32x"
+#define PRIXFAST32 "I32X"
+
+#define PRIo64 "I64o"
+#define PRIu64 "I64u"
+#define PRIx64 "I64x"
+#define PRIX64 "I64X"
+#define PRIoLEAST64 "I64o"
+#define PRIuLEAST64 "I64u"
+#define PRIxLEAST64 "I64x"
+#define PRIXLEAST64 "I64X"
+#define PRIoFAST64 "I64o"
+#define PRIuFAST64 "I64u"
+#define PRIxFAST64 "I64x"
+#define PRIXFAST64 "I64X"
+
+#define PRIoMAX "I64o"
+#define PRIuMAX "I64u"
+#define PRIxMAX "I64x"
+#define PRIXMAX "I64X"
+
+#define PRIoPTR "Io"
+#define PRIuPTR "Iu"
+#define PRIxPTR "Ix"
+#define PRIXPTR "IX"
+
+// The fscanf macros for signed integers are:
+#define SCNd8 "d"
+#define SCNi8 "i"
+#define SCNdLEAST8 "d"
+#define SCNiLEAST8 "i"
+#define SCNdFAST8 "d"
+#define SCNiFAST8 "i"
+
+#define SCNd16 "hd"
+#define SCNi16 "hi"
+#define SCNdLEAST16 "hd"
+#define SCNiLEAST16 "hi"
+#define SCNdFAST16 "hd"
+#define SCNiFAST16 "hi"
+
+#define SCNd32 "ld"
+#define SCNi32 "li"
+#define SCNdLEAST32 "ld"
+#define SCNiLEAST32 "li"
+#define SCNdFAST32 "ld"
+#define SCNiFAST32 "li"
+
+#define SCNd64 "I64d"
+#define SCNi64 "I64i"
+#define SCNdLEAST64 "I64d"
+#define SCNiLEAST64 "I64i"
+#define SCNdFAST64 "I64d"
+#define SCNiFAST64 "I64i"
+
+#define SCNdMAX "I64d"
+#define SCNiMAX "I64i"
+
+#ifdef _WIN64 // [
+# define SCNdPTR "I64d"
+# define SCNiPTR "I64i"
+#else // _WIN64 ][
+# define SCNdPTR "ld"
+# define SCNiPTR "li"
+#endif // _WIN64 ]
+
+// The fscanf macros for unsigned integers are:
+#define SCNo8 "o"
+#define SCNu8 "u"
+#define SCNx8 "x"
+#define SCNX8 "X"
+#define SCNoLEAST8 "o"
+#define SCNuLEAST8 "u"
+#define SCNxLEAST8 "x"
+#define SCNXLEAST8 "X"
+#define SCNoFAST8 "o"
+#define SCNuFAST8 "u"
+#define SCNxFAST8 "x"
+#define SCNXFAST8 "X"
+
+#define SCNo16 "ho"
+#define SCNu16 "hu"
+#define SCNx16 "hx"
+#define SCNX16 "hX"
+#define SCNoLEAST16 "ho"
+#define SCNuLEAST16 "hu"
+#define SCNxLEAST16 "hx"
+#define SCNXLEAST16 "hX"
+#define SCNoFAST16 "ho"
+#define SCNuFAST16 "hu"
+#define SCNxFAST16 "hx"
+#define SCNXFAST16 "hX"
+
+#define SCNo32 "lo"
+#define SCNu32 "lu"
+#define SCNx32 "lx"
+#define SCNX32 "lX"
+#define SCNoLEAST32 "lo"
+#define SCNuLEAST32 "lu"
+#define SCNxLEAST32 "lx"
+#define SCNXLEAST32 "lX"
+#define SCNoFAST32 "lo"
+#define SCNuFAST32 "lu"
+#define SCNxFAST32 "lx"
+#define SCNXFAST32 "lX"
+
+#define SCNo64 "I64o"
+#define SCNu64 "I64u"
+#define SCNx64 "I64x"
+#define SCNX64 "I64X"
+#define SCNoLEAST64 "I64o"
+#define SCNuLEAST64 "I64u"
+#define SCNxLEAST64 "I64x"
+#define SCNXLEAST64 "I64X"
+#define SCNoFAST64 "I64o"
+#define SCNuFAST64 "I64u"
+#define SCNxFAST64 "I64x"
+#define SCNXFAST64 "I64X"
+
+#define SCNoMAX "I64o"
+#define SCNuMAX "I64u"
+#define SCNxMAX "I64x"
+#define SCNXMAX "I64X"
+
+#ifdef _WIN64 // [
+# define SCNoPTR "I64o"
+# define SCNuPTR "I64u"
+# define SCNxPTR "I64x"
+# define SCNXPTR "I64X"
+#else // _WIN64 ][
+# define SCNoPTR "lo"
+# define SCNuPTR "lu"
+# define SCNxPTR "lx"
+# define SCNXPTR "lX"
+#endif // _WIN64 ]
+
+// 7.8.2 Functions for greatest-width integer types
+
+// 7.8.2.1 The imaxabs function
+#define imaxabs _abs64
+
+// 7.8.2.2 The imaxdiv function
+
+// This is modified version of div() function from Microsoft's div.c found
+// in %MSVC.NET%\crt\src\div.c
+#ifdef STATIC_IMAXDIV // [
+static
+#else // STATIC_IMAXDIV ][
+_inline
+#endif // STATIC_IMAXDIV ]
+imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
+{
+ imaxdiv_t result;
+
+ result.quot = numer / denom;
+ result.rem = numer % denom;
+
+ if (numer < 0 && result.rem > 0) {
+ // did division wrong; must fix up
+ ++result.quot;
+ result.rem -= denom;
+ }
+
+ return result;
+}
+
+// 7.8.2.3 The strtoimax and strtoumax functions
+#define strtoimax _strtoi64
+#define strtoumax _strtoui64
+
+// 7.8.2.4 The wcstoimax and wcstoumax functions
+#define wcstoimax _wcstoi64
+#define wcstoumax _wcstoui64
+
+
+#endif // _MSC_INTTYPES_H_ ]
diff --git a/cmake/msvc/stdint.h b/cmake/msvc/stdint.h
new file mode 100644
index 000000000..ab6d37e11
--- /dev/null
+++ b/cmake/msvc/stdint.h
@@ -0,0 +1,251 @@
+// ISO C9x compliant stdint.h for Microsoft Visual Studio
+// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
+//
+// Copyright (c) 2006-2008 Alexander Chemeris
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. The name of the author may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _MSC_VER // [
+#error "Use this header only with Microsoft Visual C++ compilers!"
+#endif // _MSC_VER ]
+
+#ifndef _MSC_STDINT_H_ // [
+#define _MSC_STDINT_H_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif
+
+#include <limits.h>
+
+// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
+// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
+// or compiler give many errors like this:
+// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
+#ifdef __cplusplus
+extern "C" {
+#endif
+# include <wchar.h>
+#ifdef __cplusplus
+}
+#endif
+
+// Define _W64 macros to mark types changing their size, like intptr_t.
+#ifndef _W64
+# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
+# define _W64 __w64
+# else
+# define _W64
+# endif
+#endif
+
+
+// 7.18.1 Integer types
+
+// 7.18.1.1 Exact-width integer types
+
+// Visual Studio 6 and Embedded Visual C++ 4 doesn't
+// realize that, e.g. char has the same size as __int8
+// so we give up on __intX for them.
+#if (_MSC_VER < 1300)
+ typedef signed char int8_t;
+ typedef signed short int16_t;
+ typedef signed int int32_t;
+ typedef unsigned char uint8_t;
+ typedef unsigned short uint16_t;
+ typedef unsigned int uint32_t;
+#else
+ typedef signed __int8 int8_t;
+ typedef signed __int16 int16_t;
+ typedef signed __int32 int32_t;
+ typedef unsigned __int8 uint8_t;
+ typedef unsigned __int16 uint16_t;
+ typedef unsigned __int32 uint32_t;
+#endif
+typedef signed __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+
+
+// 7.18.1.2 Minimum-width integer types
+typedef int8_t int_least8_t;
+typedef int16_t int_least16_t;
+typedef int32_t int_least32_t;
+typedef int64_t int_least64_t;
+typedef uint8_t uint_least8_t;
+typedef uint16_t uint_least16_t;
+typedef uint32_t uint_least32_t;
+typedef uint64_t uint_least64_t;
+
+// 7.18.1.3 Fastest minimum-width integer types
+typedef int8_t int_fast8_t;
+typedef int16_t int_fast16_t;
+typedef int32_t int_fast32_t;
+typedef int64_t int_fast64_t;
+typedef uint8_t uint_fast8_t;
+typedef uint16_t uint_fast16_t;
+typedef uint32_t uint_fast32_t;
+typedef uint64_t uint_fast64_t;
+
+// 7.18.1.4 Integer types capable of holding object pointers
+#ifdef _WIN64 // [
+ typedef signed __int64 intptr_t;
+ typedef unsigned __int64 uintptr_t;
+#else // _WIN64 ][
+ typedef _W64 signed int intptr_t;
+ typedef _W64 unsigned int uintptr_t;
+#endif // _WIN64 ]
+
+// 7.18.1.5 Greatest-width integer types
+typedef int64_t intmax_t;
+typedef uint64_t uintmax_t;
+
+
+// 7.18.2 Limits of specified-width integer types
+
+#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
+
+// 7.18.2.1 Limits of exact-width integer types
+#define INT8_MIN ((int8_t)_I8_MIN)
+#define INT8_MAX _I8_MAX
+#define INT16_MIN ((int16_t)_I16_MIN)
+#define INT16_MAX _I16_MAX
+#define INT32_MIN ((int32_t)_I32_MIN)
+#define INT32_MAX _I32_MAX
+#define INT64_MIN ((int64_t)_I64_MIN)
+#define INT64_MAX _I64_MAX
+#define UINT8_MAX _UI8_MAX
+#define UINT16_MAX _UI16_MAX
+#define UINT32_MAX _UI32_MAX
+#define UINT64_MAX _UI64_MAX
+
+// 7.18.2.2 Limits of minimum-width integer types
+#define INT_LEAST8_MIN INT8_MIN
+#define INT_LEAST8_MAX INT8_MAX
+#define INT_LEAST16_MIN INT16_MIN
+#define INT_LEAST16_MAX INT16_MAX
+#define INT_LEAST32_MIN INT32_MIN
+#define INT_LEAST32_MAX INT32_MAX
+#define INT_LEAST64_MIN INT64_MIN
+#define INT_LEAST64_MAX INT64_MAX
+#define UINT_LEAST8_MAX UINT8_MAX
+#define UINT_LEAST16_MAX UINT16_MAX
+#define UINT_LEAST32_MAX UINT32_MAX
+#define UINT_LEAST64_MAX UINT64_MAX
+
+// 7.18.2.3 Limits of fastest minimum-width integer types
+#define INT_FAST8_MIN INT8_MIN
+#define INT_FAST8_MAX INT8_MAX
+#define INT_FAST16_MIN INT16_MIN
+#define INT_FAST16_MAX INT16_MAX
+#define INT_FAST32_MIN INT32_MIN
+#define INT_FAST32_MAX INT32_MAX
+#define INT_FAST64_MIN INT64_MIN
+#define INT_FAST64_MAX INT64_MAX
+#define UINT_FAST8_MAX UINT8_MAX
+#define UINT_FAST16_MAX UINT16_MAX
+#define UINT_FAST32_MAX UINT32_MAX
+#define UINT_FAST64_MAX UINT64_MAX
+
+// 7.18.2.4 Limits of integer types capable of holding object pointers
+#ifdef _WIN64 // [
+# define INTPTR_MIN INT64_MIN
+# define INTPTR_MAX INT64_MAX
+# define UINTPTR_MAX UINT64_MAX
+#else // _WIN64 ][
+# define INTPTR_MIN INT32_MIN
+# define INTPTR_MAX INT32_MAX
+# define UINTPTR_MAX UINT32_MAX
+#endif // _WIN64 ]
+
+// 7.18.2.5 Limits of greatest-width integer types
+#define INTMAX_MIN INT64_MIN
+#define INTMAX_MAX INT64_MAX
+#define UINTMAX_MAX UINT64_MAX
+
+// 7.18.3 Limits of other integer types
+
+#ifdef _WIN64 // [
+# define PTRDIFF_MIN _I64_MIN
+# define PTRDIFF_MAX _I64_MAX
+#else // _WIN64 ][
+# define PTRDIFF_MIN _I32_MIN
+# define PTRDIFF_MAX _I32_MAX
+#endif // _WIN64 ]
+
+#define SIG_ATOMIC_MIN INT_MIN
+#define SIG_ATOMIC_MAX INT_MAX
+
+#ifndef SIZE_MAX // [
+# ifdef _WIN64 // [
+# define SIZE_MAX _UI64_MAX
+# else // _WIN64 ][
+# define SIZE_MAX _UI32_MAX
+# endif // _WIN64 ]
+#endif // SIZE_MAX ]
+
+// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
+#ifndef WCHAR_MIN // [
+# define WCHAR_MIN 0
+#endif // WCHAR_MIN ]
+#ifndef WCHAR_MAX // [
+# define WCHAR_MAX _UI16_MAX
+#endif // WCHAR_MAX ]
+
+#define WINT_MIN 0
+#define WINT_MAX _UI16_MAX
+
+#endif // __STDC_LIMIT_MACROS ]
+
+
+// 7.18.4 Limits of other integer types
+
+#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
+
+// 7.18.4.1 Macros for minimum-width integer constants
+
+#define INT8_C(val) val##i8
+#define INT16_C(val) val##i16
+#define INT32_C(val) val##i32
+#define INT64_C(val) val##i64
+
+#define UINT8_C(val) val##ui8
+#define UINT16_C(val) val##ui16
+#define UINT32_C(val) val##ui32
+#define UINT64_C(val) val##ui64
+
+// 7.18.4.2 Macros for greatest-width integer constants
+#ifndef INTMAX_C
+#define INTMAX_C INT64_C
+#endif
+#ifndef UINTMAX_C
+#define UINTMAX_C UINT64_C
+#endif
+
+#endif // __STDC_CONSTANT_MACROS ]
+
+
+#endif // _MSC_STDINT_H_ ]
diff --git a/cmake/msvc/sys/time.h b/cmake/msvc/sys/time.h
new file mode 100644
index 000000000..998b5d7bb
--- /dev/null
+++ b/cmake/msvc/sys/time.h
@@ -0,0 +1,69 @@
+#ifndef _MSC_VER // [
+#error "Use this header only with Microsoft Visual C++ compilers!"
+#endif // _MSC_VER ]
+
+#ifndef _MSC_SYS_TIME_H_
+#define _MSC_SYS_TIME_H_
+
+//http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/430449b3-f6dd-4e18-84de-eebd26a8d668
+#include < time.h >
+#include <windows.h> //I've ommited this line.
+#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
+ #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
+#else
+ #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
+#endif
+
+struct timespec {
+
+time_t tv_sec; /* Seconds since 00:00:00 GMT, */
+
+/* 1 January 1970 */
+
+long tv_nsec; /* Additional nanoseconds since */
+
+/* tv_sec */
+
+};
+
+struct timezone
+{
+ int tz_minuteswest; /* minutes W of Greenwich */
+ int tz_dsttime; /* type of dst correction */
+};
+
+static inline int gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+ FILETIME ft;
+ unsigned __int64 tmpres = 0;
+ static int tzflag;
+
+ if (NULL != tv)
+ {
+ GetSystemTimeAsFileTime(&ft);
+
+ tmpres |= ft.dwHighDateTime;
+ tmpres <<= 32;
+ tmpres |= ft.dwLowDateTime;
+
+ /*converting file time to unix epoch*/
+ tmpres -= DELTA_EPOCH_IN_MICROSECS;
+ tv->tv_sec = (long)(tmpres / 1000000UL);
+ tv->tv_usec = (long)(tmpres % 1000000UL);
+ }
+
+ if (NULL != tz)
+ {
+ if (!tzflag)
+ {
+ _tzset();
+ tzflag++;
+ }
+ tz->tz_minuteswest = _timezone / 60;
+ tz->tz_dsttime = _daylight;
+ }
+
+ return 0;
+}
+
+#endif //_MSC_SYS_TIME_H_
diff --git a/cmake/msvc/unistd.h b/cmake/msvc/unistd.h
new file mode 100644
index 000000000..de412e42a
--- /dev/null
+++ b/cmake/msvc/unistd.h
@@ -0,0 +1,10 @@
+#ifndef _MSC_VER // [
+#error "Use this header only with Microsoft Visual C++ compilers!"
+#endif // _MSC_VER ]
+
+#ifndef _MSC_UNISTD_H_ // [
+#define _MSC_UNISTD_H_
+
+#include <process.h>
+
+#endif // _MSC_UNISTD_H_ ]
diff --git a/debian/postinst b/debian/postinst
new file mode 100755
index 000000000..66a0f75c1
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/libexec/gnuradio/grc_setup_freedesktop install
diff --git a/debian/prerm b/debian/prerm
new file mode 100755
index 000000000..edc1e1e48
--- /dev/null
+++ b/debian/prerm
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/libexec/gnuradio/grc_setup_freedesktop uninstall
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
new file mode 100644
index 000000000..097e1fc67
--- /dev/null
+++ b/docs/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 dependencies
+########################################################################
+FIND_PACKAGE(Doxygen)
+
+########################################################################
+# Register component
+########################################################################
+INCLUDE(GrComponent)
+GR_REGISTER_COMPONENT("doxygen" ENABLE_DOXYGEN DOXYGEN_FOUND)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_DOXYGEN)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_COMPONENT("docs"
+ DISPLAY_NAME "Documentation"
+ DESCRIPTION "Doxygen generated documentation"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(doxygen)
+
+ENDIF(ENABLE_DOXYGEN)
diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt
new file mode 100644
index 000000000..941479f63
--- /dev/null
+++ b/docs/doxygen/CMakeLists.txt
@@ -0,0 +1,51 @@
+# 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 the doxygen configuration file
+########################################################################
+FILE(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir)
+FILE(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} abs_top_srcdir)
+FILE(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} abs_top_builddir)
+
+SET(HAVE_DOT ${DOXYGEN_DOT_FOUND})
+SET(enable_html_docs YES)
+SET(enable_latex_docs NO)
+SET(enable_xml_docs YES)
+
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
+ ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+@ONLY)
+
+SET(BUILT_DIRS ${CMAKE_CURRENT_BINARY_DIR}/xml ${CMAKE_CURRENT_BINARY_DIR}/html)
+
+########################################################################
+# Make and install doxygen docs
+########################################################################
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${BUILT_DIRS}
+ COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ COMMENT "Generating documentation with doxygen"
+)
+
+ADD_CUSTOM_TARGET(doxygen_target ALL DEPENDS ${BUILT_DIRS})
+
+INSTALL(DIRECTORY ${BUILT_DIRS} DESTINATION ${GR_PKG_DOC_DIR} COMPONENT "docs")
diff --git a/gnuradio-core/CMakeLists.txt b/gnuradio-core/CMakeLists.txt
new file mode 100644
index 000000000..102e64274
--- /dev/null
+++ b/gnuradio-core/CMakeLists.txt
@@ -0,0 +1,159 @@
+# 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.
+
+########################################################################
+# Setup dependencies
+########################################################################
+INCLUDE(GrBoost)
+
+FIND_PACKAGE(GSL)
+
+FIND_PACKAGE(FFTW3f)
+
+INCLUDE(GrPython) #used for code generation
+
+GET_FILENAME_COMPONENT(GR_CORE_PYTHONPATH
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/python ABSOLUTE
+)
+GR_SET_GLOBAL(GR_CORE_PYTHONPATH ${GR_CORE_PYTHONPATH})
+
+########################################################################
+# Register component
+########################################################################
+INCLUDE(GrComponent)
+GR_REGISTER_COMPONENT("gnuradio-core" ENABLE_GR_CORE
+ ENABLE_GRUEL_
+ Boost_FOUND
+ GSL_FOUND
+ FFTW3F_FOUND
+ PYTHONINTERP_FOUND
+)
+
+INCLUDE(GrMiscUtils)
+GR_SET_GLOBAL(GNURADIO_CORE_INCLUDE_DIRS
+ ${GRUEL_INCLUDE_DIRS} #headers depend on gruel
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/runtime
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/general
+ ${CMAKE_CURRENT_BINARY_DIR}/src/lib/general
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/gengen
+ ${CMAKE_CURRENT_BINARY_DIR}/src/lib/gengen
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/filter
+ ${CMAKE_CURRENT_BINARY_DIR}/src/lib/filter
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/missing
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/reed-solomon
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/viterbi
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/io
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/g72x
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/swig
+ ${CMAKE_CURRENT_BINARY_DIR}/src/lib/swig
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/hier
+)
+
+GR_SET_GLOBAL(GNURADIO_CORE_SWIG_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/swig
+ ${GNURADIO_CORE_INCLUDE_DIRS}
+)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_GR_CORE)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_SET(CPACK_COMPONENT_GROUP_CORE_DESCRIPTION "The GNU Radio Core Library")
+
+CPACK_COMPONENT("core_runtime"
+ GROUP "Core"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Runtime"
+ DEPENDS "gruel_runtime"
+)
+
+CPACK_COMPONENT("core_devel"
+ GROUP "Core"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+ DEPENDS "gruel_devel"
+)
+
+CPACK_COMPONENT("core_python"
+ GROUP "Core"
+ DISPLAY_NAME "Python"
+ DESCRIPTION "Python modules for runtime; GRC xml files"
+ DEPENDS "gruel_python;core_runtime"
+)
+
+CPACK_COMPONENT("core_swig"
+ GROUP "Core"
+ DISPLAY_NAME "SWIG"
+ DESCRIPTION "SWIG development .i files"
+ DEPENDS "gruel_swig;core_python;core_devel"
+)
+
+INSTALL(
+ FILES gnuradio-core.conf
+ DESTINATION ${GR_PKG_CONF_DIR}
+ COMPONENT "core_runtime"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(src/lib)
+IF(ENABLE_TESTING)
+ ADD_SUBDIRECTORY(src/tests)
+ENDIF(ENABLE_TESTING)
+IF(ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(src/lib/swig)
+ ADD_SUBDIRECTORY(src/python/gnuradio)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Create Pkg Config File
+########################################################################
+FILE(TO_NATIVE_PATH "\${prefix}/${GR_INCLUDE_DIR}/gnuradio" includedir) #different from other gr modules
+FILE(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}/${GR_DATA_DIR}/guile/site" guile_load_path) #screw this...
+
+FOREACH(boost_include ${Boost_INCLUDE_DIRS})
+ SET(BOOST_CXXFLAGS "-I${boost_include} ${BOOST_CXXFLAGS}")
+ENDFOREACH(boost_include)
+
+FOREACH(boost_libdir ${Boost_LIBRARY_DIRS})
+ SET(BOOST_LDFLAGS "-L${boost_libdir} ${BOOST_LDFLAGS}")
+ENDFOREACH(boost_libdir)
+
+FOREACH(boost_ldflag ${Boost_LIBRARIES})
+ SET(BOOST_LDFLAGS "${boost_ldflag} ${BOOST_LDFLAGS}")
+ENDFOREACH(boost_ldflag)
+
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-core.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-core.pc
+@ONLY)
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-core.pc
+ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
+ COMPONENT "core_devel"
+)
+
+ENDIF(ENABLE_GR_CORE)
diff --git a/gnuradio-core/src/lib/CMakeLists.txt b/gnuradio-core/src/lib/CMakeLists.txt
new file mode 100644
index 000000000..060421a9f
--- /dev/null
+++ b/gnuradio-core/src/lib/CMakeLists.txt
@@ -0,0 +1,100 @@
+# 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.
+
+########################################################################
+# Setup compatibility checks and defines
+########################################################################
+INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/ConfigChecks.cmake)
+
+########################################################################
+# Include subdirs rather to populate to the sources lists.
+########################################################################
+GR_INCLUDE_SUBDIRECTORY(missing)
+GR_INCLUDE_SUBDIRECTORY(runtime)
+GR_INCLUDE_SUBDIRECTORY(filter)
+GR_INCLUDE_SUBDIRECTORY(viterbi)
+GR_INCLUDE_SUBDIRECTORY(general)
+GR_INCLUDE_SUBDIRECTORY(gengen)
+GR_INCLUDE_SUBDIRECTORY(reed-solomon)
+GR_INCLUDE_SUBDIRECTORY(io)
+GR_INCLUDE_SUBDIRECTORY(hier)
+
+LIST(APPEND gnuradio_core_sources bug_work_around_6.cc)
+LIST(APPEND test_gnuradio_core_sources bug_work_around_6.cc)
+
+########################################################################
+# Setup the include and linker paths
+########################################################################
+INCLUDE_DIRECTORIES(${GNURADIO_CORE_INCLUDE_DIRS})
+
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+ADD_DEFINITIONS(-DGSL_DLL) #needed for gsl windows port but safe to always define
+INCLUDE_DIRECTORIES(${GSL_INCLUDE_DIRS})
+LINK_DIRECTORIES(${GSL_LIBRARY_DIRS})
+
+INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS})
+LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS})
+
+########################################################################
+# Setup library
+########################################################################
+LIST(APPEND gnuradio_core_libs
+ gruel
+ ${Boost_LIBRARIES}
+ ${GSL_LIBRARIES}
+ ${FFTW3F_LIBRARIES}
+)
+
+ADD_DEFINITIONS(${GR_COMMON_FLAGS_AND_DEFINES})
+ADD_LIBRARY(gnuradio-core SHARED ${gnuradio_core_sources})
+TARGET_LINK_LIBRARIES(gnuradio-core ${gnuradio_core_libs})
+SET_TARGET_PROPERTIES(gnuradio-core PROPERTIES DEFINE_SYMBOL "gnuradio_core_EXPORTS")
+SET_TARGET_PROPERTIES(gnuradio-core PROPERTIES SOVERSION ${LIBVER})
+
+INSTALL(TARGETS gnuradio-core
+ LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "core_runtime" # .so/.dylib file
+ ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "core_devel" # .lib file
+ RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "core_runtime" # .dll file
+)
+
+########################################################################
+# Setup executables
+########################################################################
+ADD_EXECUTABLE(gnuradio-config-info gnuradio-config-info.cc)
+TARGET_LINK_LIBRARIES(gnuradio-config-info gnuradio-core)
+INSTALL(
+ TARGETS gnuradio-config-info
+ DESTINATION ${GR_RUNTIME_DIR}
+ COMPONENT "core_runtime"
+)
+
+########################################################################
+# Setup tests
+########################################################################
+IF(ENABLE_TESTING)
+
+INCLUDE_DIRECTORIES(${CPPUNIT_INCLUDE_DIRS})
+LINK_DIRECTORIES(${CPPUNIT_LIBRARY_DIRS})
+
+ADD_LIBRARY(test-gnuradio-core SHARED ${test_gnuradio_core_sources})
+TARGET_LINK_LIBRARIES(test-gnuradio-core gnuradio-core ${CPPUNIT_LIBRARIES})
+
+ENDIF(ENABLE_TESTING)
diff --git a/gnuradio-core/src/lib/ConfigChecks.cmake b/gnuradio-core/src/lib/ConfigChecks.cmake
new file mode 100644
index 000000000..30a1011e4
--- /dev/null
+++ b/gnuradio-core/src/lib/ConfigChecks.cmake
@@ -0,0 +1,212 @@
+# 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(GrMiscUtils)
+INCLUDE(CheckCXXSourceCompiles)
+
+IF(MSVC) #add this directory for our provided headers
+LIST(APPEND CMAKE_REQUIRED_INCLUDES ${CMAKE_SOURCE_DIR}/msvc)
+ENDIF(MSVC)
+
+GR_CHECK_HDR_N_DEF(netdb.h HAVE_NETDB_H)
+GR_CHECK_HDR_N_DEF(sys/time.h HAVE_SYS_TIME_H)
+GR_CHECK_HDR_N_DEF(sys/types.h HAVE_SYS_TYPES_H)
+GR_CHECK_HDR_N_DEF(sys/select.h HAVE_SYS_SELECT_H)
+GR_CHECK_HDR_N_DEF(sys/socket.h HAVE_SYS_SOCKET_H)
+GR_CHECK_HDR_N_DEF(io.h HAVE_IO_H)
+GR_CHECK_HDR_N_DEF(sys/mman.h HAVE_SYS_MMAN_H)
+GR_CHECK_HDR_N_DEF(sys/ipc.h HAVE_SYS_IPC_H)
+GR_CHECK_HDR_N_DEF(sys/shm.h HAVE_SYS_SHM_H)
+GR_CHECK_HDR_N_DEF(signal.h HAVE_SIGNAL_H)
+GR_CHECK_HDR_N_DEF(netinet/in.h HAVE_NETINET_IN_H)
+GR_CHECK_HDR_N_DEF(arpa/inet.h HAVE_ARPA_INET_H)
+GR_CHECK_HDR_N_DEF(byteswap.h HAVE_BYTESWAP_H)
+GR_CHECK_HDR_N_DEF(linux/ppdev.h HAVE_LINUX_PPDEV_H)
+GR_CHECK_HDR_N_DEF(dev/ppbus/ppi.h HAVE_DEV_PPBUS_PPI_H)
+GR_CHECK_HDR_N_DEF(unistd.h HAVE_UNISTD_H)
+GR_CHECK_HDR_N_DEF(malloc.h HAVE_MALLOC_H)
+
+
+########################################################################
+CHECK_CXX_SOURCE_COMPILES("
+ #include <stdio.h>
+ int main(){snprintf(0, 0, 0); return 0;}
+ " HAVE_SNPRINTF
+)
+GR_ADD_COND_DEF(HAVE_SNPRINTF)
+
+########################################################################
+CHECK_CXX_SOURCE_COMPILES("
+ #include <signal.h>
+ int main(){sigaction(0, 0, 0); return 0;}
+ " HAVE_SIGACTION
+)
+GR_ADD_COND_DEF(HAVE_SIGACTION)
+
+########################################################################
+CHECK_CXX_SOURCE_COMPILES("
+ #include <sys/select.h>
+ int main(){select(0, 0, 0, 0, 0); return 0;}
+ " HAVE_SELECT
+)
+GR_ADD_COND_DEF(HAVE_SELECT)
+
+
+########################################################################
+CHECK_CXX_SOURCE_COMPILES("
+ #include <unistd.h>
+ int main(){sysconf(0); return 0;}
+ " HAVE_SYSCONF
+)
+GR_ADD_COND_DEF(HAVE_SYSCONF)
+
+CHECK_CXX_SOURCE_COMPILES("
+ #include <unistd.h>
+ int main(){getpagesize(); return 0;}
+ " HAVE_GETPAGESIZE
+)
+GR_ADD_COND_DEF(HAVE_GETPAGESIZE)
+
+
+########################################################################
+CHECK_CXX_SOURCE_COMPILES("
+ #include <Winbase.h>
+ int main(){Sleep(0); return 0;}
+ " HAVE_SSLEEP
+)
+GR_ADD_COND_DEF(HAVE_SSLEEP)
+
+CHECK_CXX_SOURCE_COMPILES("
+ #include <time.h>
+ int main(){nanosleep(0, 0); return 0;}
+ " HAVE_NANOSLEEP
+)
+GR_ADD_COND_DEF(HAVE_NANOSLEEP)
+
+CHECK_CXX_SOURCE_COMPILES("
+ #include <sys/time.h>
+ int main(){gettimeofday(0, 0); return 0;}
+ " HAVE_GETTIMEOFDAY
+)
+GR_ADD_COND_DEF(HAVE_GETTIMEOFDAY)
+
+########################################################################
+CHECK_CXX_SOURCE_COMPILES("
+ #include <stdlib.h>
+ int main(){posix_memalign(0, 0, 0); return 0;}
+ " HAVE_POSIX_MEMALIGN
+)
+GR_ADD_COND_DEF(HAVE_POSIX_MEMALIGN)
+
+CHECK_CXX_SOURCE_COMPILES("
+ #include <malloc.h>
+ int main(){valloc(0); return 0;}
+ " HAVE_VALLOC
+)
+GR_ADD_COND_DEF(HAVE_VALLOC)
+
+ADD_DEFINITIONS(-DALIGNED_MALLOC=0)
+
+########################################################################
+SET(CMAKE_REQUIRED_LIBRARIES -lpthread)
+CHECK_CXX_SOURCE_COMPILES("
+ #include <signal.h>
+ int main(){pthread_sigmask(0, 0, 0); return 0;}
+ " HAVE_PTHREAD_SIGMASK
+)
+GR_ADD_COND_DEF(HAVE_PTHREAD_SIGMASK)
+SET(CMAKE_REQUIRED_LIBRARIES)
+
+########################################################################
+CHECK_CXX_SOURCE_COMPILES("
+ #include <windows.h>
+ int main(){
+ HANDLE handle;
+ int size;
+ LPCTSTR lpName;
+ handle = CreateFileMapping(
+ INVALID_HANDLE_VALUE, // use paging file
+ NULL, // default security
+ PAGE_READWRITE, // read/write access
+ 0, // max. object size
+ size, // buffer size
+ lpName); // name of mapping object
+ return 0;
+ } " HAVE_CREATEFILEMAPPING
+)
+GR_ADD_COND_DEF(HAVE_CREATEFILEMAPPING)
+
+########################################################################
+CHECK_INCLUDE_FILE_CXX(windows.h HAVE_WINDOWS_H)
+IF(HAVE_WINDOWS_H)
+ ADD_DEFINITIONS(-DHAVE_WINDOWS_H -DUSING_WINSOCK)
+ MESSAGE(STATUS "Adding windows libs to gnuradio core libs...")
+ LIST(APPEND gnuradio_core_libs WS2_32.lib WSock32.lib)
+ENDIF(HAVE_WINDOWS_H)
+
+########################################################################
+SET(CMAKE_REQUIRED_LIBRARIES -lrt)
+CHECK_CXX_SOURCE_COMPILES("
+ #include <sys/types.h>
+ #include <sys/mman.h>
+ int main(){shm_open(0, 0, 0); return 0;}
+ " HAVE_SHM_OPEN
+)
+GR_ADD_COND_DEF(HAVE_SHM_OPEN)
+SET(CMAKE_REQUIRED_LIBRARIES)
+
+########################################################################
+CHECK_CXX_SOURCE_COMPILES("
+ #define _GNU_SOURCE
+ #include <math.h>
+ int main(){double x, sin, cos; sincos(x, &sin, &cos); return 0;}
+ " HAVE_SINCOS
+)
+GR_ADD_COND_DEF(HAVE_SINCOS)
+
+CHECK_CXX_SOURCE_COMPILES("
+ #define _GNU_SOURCE
+ #include <math.h>
+ int main(){float x, sin, cos; sincosf(x, &sin, &cos); return 0;}
+ " HAVE_SINCOSF
+)
+GR_ADD_COND_DEF(HAVE_SINCOSF)
+
+CHECK_CXX_SOURCE_COMPILES("
+ #include <math.h>
+ int main(){sinf(0); return 0;}
+ " HAVE_SINF
+)
+GR_ADD_COND_DEF(HAVE_SINF)
+
+CHECK_CXX_SOURCE_COMPILES("
+ #include <math.h>
+ int main(){cosf(0); return 0;}
+ " HAVE_COSF
+)
+GR_ADD_COND_DEF(HAVE_COSF)
+
+########################################################################
+CHECK_CXX_SOURCE_COMPILES("
+ #include <sys/mman.h>
+ int main(){mmap(0, 0, 0, 0, 0, 0); return 0;}
+ " HAVE_MMAP
+)
+GR_ADD_COND_DEF(HAVE_MMAP)
diff --git a/gnuradio-core/src/lib/filter/CMakeLists.txt b/gnuradio-core/src/lib/filter/CMakeLists.txt
new file mode 100644
index 000000000..ab136af14
--- /dev/null
+++ b/gnuradio-core/src/lib/filter/CMakeLists.txt
@@ -0,0 +1,339 @@
+# 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.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+
+#set the C language property on the assembly files so the compiler will pick them up
+FILE(GLOB gr_core_filter_asms ${CMAKE_CURRENT_SOURCE_DIR}/*.S)
+FOREACH(gr_core_filter_asm ${gr_core_filter_asms})
+ SET_PROPERTY(SOURCE ${gr_core_filter_asm} PROPERTY LANGUAGE C)
+ENDFOREACH(gr_core_filter_asm)
+
+########################################################################
+# Generate the makefile.gen, then extract its sources:
+# This is a round-about way to extract the sources,
+# but it requires minimum changed to the python utils.
+#
+# The recommended way to do this:
+# - Make a generation macro that registers the sources command.
+# - List the generation macro with each templated source file.
+# - Create a python script (very generic) to perform generation.
+# - This way the targets would depend only on their sources.
+########################################################################
+EXECUTE_PROCESS(
+ COMMAND ${PYTHON_EXECUTABLE} -c "
+import os, sys
+sys.path.append('${GR_CORE_PYTHONPATH}')
+sys.path.append('${CMAKE_CURRENT_SOURCE_DIR}')
+os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+os.environ['gendir'] = '${CMAKE_CURRENT_BINARY_DIR}'
+os.environ['do_makefile'] = '1'
+os.environ['do_sources'] = '0'
+from generate_all import generate_all
+generate_all()
+ " WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+MACRO(FILTER_GEN_EXTRACT outvar ext)
+ EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import os; print ';'.join(
+ map(lambda x: os.path.join('${CMAKE_CURRENT_BINARY_DIR}', x.replace('\\\\', '').strip()),
+ filter(lambda f: '${ext}' in f, open('${CMAKE_CURRENT_BINARY_DIR}/Makefile.gen').readlines()
+ )))" OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE ${outvar})
+ FILE(TO_CMAKE_PATH "${${outvar}}" ${outvar})
+ENDMACRO(FILTER_GEN_EXTRACT)
+
+FILTER_GEN_EXTRACT(generated_filter_sources ".cc")
+FILTER_GEN_EXTRACT(generated_filter_includes ".h")
+FILTER_GEN_EXTRACT(generated_filter_swigs ".i")
+
+#TODO simplify this list with a triple-threat for loop
+SET(generated_filter_deps
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_all.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_gr_fir_XXX.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_gr_fir_filter_XXX.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_gr_interp_fir_filter_XXX.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_gr_rational_resampler_base_XXX.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_gr_fir_sysconfig.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_gr_fir_sysconfig_generic.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_gr_fir_util.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_gr_freq_xlating_fir_filter_XXX.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_gri_fir_filter_with_buffer_XXX.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_utils.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_XXX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_XXX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_XXX_generic.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_XXX_generic.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_filter_XXX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_filter_XXX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_filter_XXX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_interp_fir_filter_XXX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_interp_fir_filter_XXX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_interp_fir_filter_XXX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_rational_resampler_base_XXX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_rational_resampler_base_XXX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_rational_resampler_base_XXX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_freq_xlating_fir_filter_XXX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_freq_xlating_fir_filter_XXX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_freq_xlating_fir_filter_XXX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_fir_filter_with_buffer_XXX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_fir_filter_with_buffer_XXX.h.t
+)
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT
+ ${generated_filter_sources}
+ ${generated_filter_includes}
+ ${generated_filter_swigs}
+ DEPENDS ${generated_filter_deps}
+ COMMAND ${PYTHON_EXECUTABLE} -B -c
+ \"import os, sys\;sys.path.append('${GR_CORE_PYTHONPATH}')\;sys.path.append('${CMAKE_CURRENT_SOURCE_DIR}')\;os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'\;from generate_all import generate_all\;generate_all()\"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ COMMENT "generating filter files"
+)
+
+ADD_CUSTOM_TARGET(filter_generated DEPENDS
+ ${generated_filter_sources}
+ ${generated_filter_includes}
+ ${generated_filter_swigs}
+)
+
+########################################################################
+# Add target specific files
+# May VOLK put a rest to all the insanity below.
+########################################################################
+IF(MSVC)
+ LIST(APPEND gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/sysconfig_generic.cc
+ )
+ LIST(APPEND test_gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_dotprod_generic.cc
+ )
+ELSE(MSVC)
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86|x86_64)$")
+ LIST(APPEND gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/sysconfig_x86.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_sysconfig_x86.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_cpu_x86.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_ccc_simd.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_ccc_x86.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_fff_simd.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_fff_x86.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_fsf_simd.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_fsf_x86.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_scc_simd.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_scc_x86.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_fcc_simd.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_fcc_x86.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_ccf_simd.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_ccf_x86.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/sse_debug.c
+ )
+ LIST(APPEND test_gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_dotprod_x86.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_float_dotprod_x86.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_complex_dotprod_x86.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_ccomplex_dotprod_x86.cc
+ )
+ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86|x86_64)$")
+
+IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ LIST(APPEND gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/float_dotprod_sse64.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/float_dotprod_3dnow64.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/complex_dotprod_3dnowext64.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/complex_dotprod_3dnow64.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/complex_dotprod_sse64.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/ccomplex_dotprod_3dnowext64.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/ccomplex_dotprod_3dnow64.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/ccomplex_dotprod_sse64.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/fcomplex_dotprod_3dnow64.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/fcomplex_dotprod_sse64.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/short_dotprod_mmx64.S
+ )
+ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86)$")
+ LIST(APPEND gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/float_dotprod_sse.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/float_dotprod_3dnow.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/complex_dotprod_3dnowext.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/complex_dotprod_3dnow.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/complex_dotprod_sse.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/ccomplex_dotprod_3dnowext.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/ccomplex_dotprod_3dnow.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/ccomplex_dotprod_sse.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/fcomplex_dotprod_3dnow.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/fcomplex_dotprod_sse.S
+ ${CMAKE_CURRENT_SOURCE_DIR}/short_dotprod_mmx.S
+ )
+ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
+ LIST(APPEND gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/sysconfig_powerpc.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_sysconfig_powerpc.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_cpu_powerpc.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_fff_altivec.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_altivec.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/dotprod_fff_altivec.c
+ )
+ LIST(APPEND test_gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_dotprod_powerpc.cc
+ )
+ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
+ LIST(APPEND gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/sysconfig_armv7_a.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_sysconfig_armv7_a.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_cpu_armv7_a.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_fff_armv7_a.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/dotprod_fff_armv7_a.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/dotprod_ccf_armv7_a.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_ccf_armv7_a.c
+ )
+ LIST(APPEND test_gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_dotprod_armv7_a.cc
+ )
+ELSE(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ LIST(APPEND gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/sysconfig_generic.cc
+ )
+ LIST(APPEND test_gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_dotprod_generic.cc
+ )
+ENDIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ENDIF(MSVC)
+
+########################################################################
+# Append gnuradio-core library sources
+########################################################################
+LIST(APPEND gnuradio_core_sources
+ ${generated_filter_sources}
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_fft_filter_fff_generic.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_fft_filter_ccc_generic.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sincos.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_goertzel.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_mmse_fir_interpolator.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_mmse_fir_interpolator_cc.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/complex_dotprod_generic.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/ccomplex_dotprod_generic.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/float_dotprod_generic.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/short_dotprod_generic.c
+)
+
+########################################################################
+# Append gnuradio-core test sources
+########################################################################
+LIST(APPEND test_gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_filter.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_fir_ccf.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_fir_fcc.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_fir_fff.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_fir_ccc.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_fir_scc.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_rotator.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gri_mmse_fir_interpolator.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gri_mmse_fir_interpolator_cc.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gri_fir_filter_with_buffer_ccf.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gri_fir_filter_with_buffer_ccc.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gri_fir_filter_with_buffer_fcc.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gri_fir_filter_with_buffer_fff.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gri_fir_filter_with_buffer_fsf.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gri_fir_filter_with_buffer_scc.cc
+)
+
+########################################################################
+# Install runtime headers
+########################################################################
+INSTALL(FILES
+ ${generated_filter_includes}
+ ${CMAKE_CURRENT_SOURCE_DIR}/complex_dotprod_generic.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/complex_dotprod_x86.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/fcomplex_dotprod_x86.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/ccomplex_dotprod_generic.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/ccomplex_dotprod_x86.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/float_dotprod_generic.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/float_dotprod_x86.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_altivec.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_cpu.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_fft_filter_fff_generic.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_fft_filter_ccc_generic.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_sysconfig_x86.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fir_sysconfig_powerpc.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_rotator.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sincos.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_single_pole_iir.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vec_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_goertzel.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_iir.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_mmse_fir_interpolator.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_mmse_fir_interpolator_cc.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_filter.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/short_dotprod_generic.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/short_dotprod_x86.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/sse_debug.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "core_devel"
+)
+
+########################################################################
+# Install swig headers
+########################################################################
+IF(ENABLE_PYTHON)
+INSTALL(FILES
+ ${generated_filter_swigs}
+ ${CMAKE_CURRENT_SOURCE_DIR}/filter.i
+ ${CMAKE_CURRENT_BINARY_DIR}/filter_generated.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "core_swig"
+)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Handle triple-threat files that have cc, h, and i
+########################################################################
+SET(gr_core_filter_triple_threats
+ gr_adaptive_fir_ccc
+ gr_adaptive_fir_ccf
+ gr_cma_equalizer_cc
+ gr_dc_blocker_cc
+ gr_dc_blocker_ff
+ gr_fft_filter_ccc
+ gr_fft_filter_fff
+ gr_filter_delay_fc
+ gr_fractional_interpolator_ff
+ gr_fractional_interpolator_cc
+ gr_goertzel_fc
+ gr_hilbert_fc
+ gr_iir_filter_ffd
+ gr_single_pole_iir_filter_ff
+ gr_single_pole_iir_filter_cc
+ gr_pfb_channelizer_ccf
+ gr_pfb_synthesis_filterbank_ccf
+ gr_pfb_decimator_ccf
+ gr_pfb_interpolator_ccf
+ gr_pfb_arb_resampler_ccf
+ gr_pfb_clock_sync_ccf
+ gr_pfb_clock_sync_fff
+)
+
+FOREACH(file_tt ${gr_core_filter_triple_threats})
+ LIST(APPEND gnuradio_core_sources ${CMAKE_CURRENT_SOURCE_DIR}/${file_tt}.cc)
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${file_tt}.h DESTINATION ${GR_INCLUDE_DIR}/gnuradio COMPONENT "core_devel")
+ IF(ENABLE_PYTHON)
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${file_tt}.i DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig COMPONENT "core_swig")
+ ENDIF(ENABLE_PYTHON)
+ENDFOREACH(file_tt ${gr_core_filter_triple_threats})
diff --git a/gnuradio-core/src/lib/general/CMakeLists.txt b/gnuradio-core/src/lib/general/CMakeLists.txt
new file mode 100644
index 000000000..d9e635347
--- /dev/null
+++ b/gnuradio-core/src/lib/general/CMakeLists.txt
@@ -0,0 +1,306 @@
+# 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.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+
+########################################################################
+# Handle the generated sine table
+########################################################################
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sine_table.h
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gen_sine_table.py
+ COMMAND ${PYTHON_EXECUTABLE}
+ ${CMAKE_CURRENT_SOURCE_DIR}/gen_sine_table.py >
+ ${CMAKE_CURRENT_BINARY_DIR}/sine_table.h
+)
+
+INCLUDE(AddFileDependencies)
+ADD_FILE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/gr_fxpt.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/sine_table.h
+)
+
+########################################################################
+# Handle the generated constants
+########################################################################
+EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
+ "import time;print time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime())"
+ OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+MESSAGE(STATUS "Loading build date ${BUILD_DATE} into gr_constants...")
+
+MESSAGE(STATUS "Loading version ${VERSION} into gr_constants...")
+
+FILE(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}/${GR_CONF_DIR}" SYSCONFDIR)
+FILE(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}/${GR_PKG_CONF_DIR}" GR_PREFSDIR)
+
+#double escape for windows backslash path separators
+STRING(REPLACE "\\" "\\\\" prefix ${prefix})
+STRING(REPLACE "\\" "\\\\" SYSCONFDIR ${SYSCONFDIR})
+STRING(REPLACE "\\" "\\\\" GR_PREFSDIR ${GR_PREFSDIR})
+
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_constants.cc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gr_constants.cc
+@ONLY)
+
+LIST(APPEND gnuradio_core_sources ${CMAKE_CURRENT_BINARY_DIR}/gr_constants.cc)
+
+########################################################################
+# Append gnuradio-core library sources
+########################################################################
+LIST(APPEND gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_circular_file.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_count_bits.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fast_atan2f.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fft_vcc_fftw.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fxpt.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_misc.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_random.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_reverse.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_add_const_ss_generic.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_char_to_float.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_debugger_hook.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_fft.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_char.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_short.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_uchar.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_glfsr.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_interleaved_short_to_complex.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_short_to_float.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_uchar_to_float.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/malloc16.c
+)
+
+########################################################################
+# Append gnuradio-core test sources
+########################################################################
+LIST(APPEND test_gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_general.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_circular_file.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_firdes.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_fxpt.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_fxpt_nco.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_fxpt_vco.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_math.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gri_lfsr.cc
+)
+
+########################################################################
+# Install runtime headers
+########################################################################
+INSTALL(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_core_api.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_circular_file.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_constants.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_count_bits.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_expj.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fft_vcc_fftw.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fxpt.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fxpt_nco.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_fxpt_vco.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_log2_const.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_math.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_misc.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_nco.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_random.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_reverse.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_simple_framer_sync.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_test_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vco.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_add_const_ss.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc_cc.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc_ff.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc2_cc.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc2_ff.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_char_to_float.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_debugger_hook.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_fft.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_char.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_short.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_uchar.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_lfsr.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_glfsr.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_interleaved_short_to_complex.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_lfsr_15_1_0.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_lfsr_32k.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_short_to_float.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_uchar_to_float.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/malloc16.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/random.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "core_devel"
+)
+
+########################################################################
+# Install swig headers
+########################################################################
+IF(ENABLE_PYTHON)
+INSTALL(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/general.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_constants.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc_cc.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc_ff.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc2_cc.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc2_ff.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "core_swig"
+)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Handle triple-threat files that have cc, h, and i
+########################################################################
+SET(gr_core_general_triple_threats
+ complex_vec_test
+ gr_additive_scrambler_bb
+ gr_agc_cc
+ gr_agc_ff
+ gr_agc2_cc
+ gr_agc2_ff
+ gr_align_on_samplenumbers_ss
+ gr_bin_statistics_f
+ gr_binary_slicer_fb
+ gr_bytes_to_syms
+ gr_char_to_float
+ gr_check_counting_s
+ gr_check_lfsr_32k_s
+ gr_clock_recovery_mm_cc
+ gr_clock_recovery_mm_ff
+ gr_complex_to_interleaved_short
+ gr_complex_to_xxx
+ gr_conjugate_cc
+ gr_constellation_decoder_cb
+ gr_copy
+ gr_correlate_access_code_bb
+ gr_costas_loop_cc
+ gr_cpfsk_bc
+ gr_crc32
+ gr_ctcss_squelch_ff
+ gr_decode_ccsds_27_fb
+ gr_diff_decoder_bb
+ gr_diff_encoder_bb
+ gr_diff_phasor_cc
+ gr_dpll_bb
+ gr_deinterleave
+ gr_delay
+ gr_encode_ccsds_27_bb
+ gr_fake_channel_coder_pp
+ gr_feedforward_agc_cc
+ gr_feval
+ gr_fft_vcc
+ gr_fft_vfc
+ gr_firdes
+ gr_fll_band_edge_cc
+ gr_float_to_char
+ gr_float_to_complex
+ gr_float_to_short
+ gr_float_to_uchar
+ gr_fmdet_cf
+ gr_frequency_modulator_fc
+ gr_framer_sink_1
+ gr_glfsr_source_b
+ gr_glfsr_source_f
+ gr_head
+ gr_int_to_float
+ gr_interleave
+ gr_interleaved_short_to_complex
+ gr_iqcomp_cc
+ gr_keep_one_in_n
+ gr_kludge_copy
+ gr_lfsr_32k_source_s
+ gr_lms_dfe_cc
+ gr_lms_dfe_ff
+ gr_map_bb
+ gr_mpsk_receiver_cc
+ gr_nlog10_ff
+ gr_nop
+ gr_null_sink
+ gr_null_source
+ gr_ofdm_frame_acquisition
+ gr_ofdm_cyclic_prefixer
+ gr_ofdm_demapper_vcb
+ gr_ofdm_mapper_bcv
+ gr_ofdm_frame_sink
+ #gr_ofdm_frame_sink2 #cannot build yet...
+ gr_ofdm_insert_preamble
+ gr_ofdm_sampler
+ gr_pa_2x2_phase_combiner
+ gr_packet_sink
+ gr_peak_detector2_fb
+ gr_phase_modulator_fc
+ gr_pll_carriertracking_cc
+ gr_pll_freqdet_cf
+ gr_pll_refout_cc
+ gr_pn_correlator_cc
+ gr_prefs
+ gr_probe_avg_mag_sqrd_c
+ gr_probe_avg_mag_sqrd_cf
+ gr_probe_avg_mag_sqrd_f
+ gr_probe_signal_f
+ gr_pwr_squelch_cc
+ gr_pwr_squelch_ff
+ gr_quadrature_demod_cf
+ gr_rail_ff
+ gr_regenerate_bb
+ gr_remez
+ gr_rms_cf
+ gr_rms_ff
+ gr_repeat
+ gr_short_to_float
+ gr_simple_correlator
+ gr_simple_framer
+ gr_simple_squelch_cc
+ gr_skiphead
+ gr_squash_ff
+ gr_squelch_base_cc
+ gr_squelch_base_ff
+ gr_stream_mux
+ gr_stream_to_streams
+ gr_stream_to_vector
+ gr_streams_to_stream
+ gr_streams_to_vector
+ gr_stretch_ff
+ gr_test
+ gr_threshold_ff
+ gr_throttle
+ gr_uchar_to_float
+ gr_vco_f
+ gr_vector_to_stream
+ gr_vector_to_streams
+ gr_unpack_k_bits_bb
+ gr_wavelet_ff
+ gr_wvps_ff
+ gr_descrambler_bb
+ gr_scrambler_bb
+ gr_probe_mpsk_snr_c
+ gr_probe_density_b
+ gr_annotator_alltoall
+ gr_annotator_1to1
+ gr_burst_tagger
+)
+
+FOREACH(file_tt ${gr_core_general_triple_threats})
+ LIST(APPEND gnuradio_core_sources ${CMAKE_CURRENT_SOURCE_DIR}/${file_tt}.cc)
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${file_tt}.h DESTINATION ${GR_INCLUDE_DIR}/gnuradio COMPONENT "core_devel")
+ IF(ENABLE_PYTHON)
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${file_tt}.i DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig COMPONENT "core_swig")
+ ENDIF(ENABLE_PYTHON)
+ENDFOREACH(file_tt ${gr_core_general_triple_threats})
diff --git a/gnuradio-core/src/lib/gengen/CMakeLists.txt b/gnuradio-core/src/lib/gengen/CMakeLists.txt
new file mode 100644
index 000000000..a06a61e6d
--- /dev/null
+++ b/gnuradio-core/src/lib/gengen/CMakeLists.txt
@@ -0,0 +1,191 @@
+# 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.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+
+########################################################################
+# Generate the makefile.gen, then extract its sources:
+# This is a round-about way to extract the sources,
+# but it requires minimum changed to the python utils.
+#
+# The recommended way to do this:
+# - Make a generation macro that registers the sources command.
+# - List the generation macro with each templated source file.
+# - Create a python script (very generic) to perform generation.
+# - This way the targets would depend only on their sources.
+########################################################################
+EXECUTE_PROCESS(
+ COMMAND ${PYTHON_EXECUTABLE} -c "
+import os, sys
+sys.path.append('${GR_CORE_PYTHONPATH}')
+sys.path.append('${CMAKE_CURRENT_SOURCE_DIR}')
+os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+os.environ['gendir'] = '${CMAKE_CURRENT_BINARY_DIR}'
+os.environ['do_makefile'] = '1'
+os.environ['do_sources'] = '0'
+from generate_all import generate_all
+generate_all()
+ " WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+MACRO(GEGEN_GEN_EXTRACT outvar ext)
+ EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import os; print ';'.join(
+ map(lambda x: os.path.join('${CMAKE_CURRENT_BINARY_DIR}', x.replace('\\\\', '').strip()),
+ filter(lambda f: '${ext}' in f, open('${CMAKE_CURRENT_BINARY_DIR}/Makefile.gen').readlines()
+ )))" OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE ${outvar})
+ FILE(TO_CMAKE_PATH "${${outvar}}" ${outvar})
+ENDMACRO(GEGEN_GEN_EXTRACT)
+
+GEGEN_GEN_EXTRACT(generated_gengen_sources ".cc")
+GEGEN_GEN_EXTRACT(generated_gengen_includes ".h")
+GEGEN_GEN_EXTRACT(generated_gengen_swigs ".i")
+
+#TODO simplify this list with a triple-threat for loop
+SET(generated_gengen_deps
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_all.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_common.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_add_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_add_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_add_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_add_const_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_add_const_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_add_const_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_add_const_vXX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_add_const_vXX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_add_const_vXX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_argmax_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_argmax_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_argmax_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_chunks_to_symbols_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_chunks_to_symbols_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_chunks_to_symbols_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_divide_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_divide_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_divide_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_integrate_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_integrate_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_integrate_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_max_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_max_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_max_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_multiply_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_multiply_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_multiply_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_multiply_const_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_multiply_const_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_multiply_const_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_multiply_const_vXX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_multiply_const_vXX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_multiply_const_vXX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_mute_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_mute_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_mute_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_noise_source_X.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_noise_source_X.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_noise_source_X.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_packed_to_unpacked_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_packed_to_unpacked_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_packed_to_unpacked_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_peak_detector_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_peak_detector_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_peak_detector_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sample_and_hold_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sample_and_hold_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sample_and_hold_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sig_source_X.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sig_source_X.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sig_source_X.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sub_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sub_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sub_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_unpacked_to_packed_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_unpacked_to_packed_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_unpacked_to_packed_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vector_source_X.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vector_source_X.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vector_source_X.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vector_sink_X.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vector_sink_X.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vector_sink_X.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_xor_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_xor_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_xor_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_and_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_and_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_and_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_and_const_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_and_const_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_and_const_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_or_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_or_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_or_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_not_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_not_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_not_XX.i.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_moving_average_XX.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_moving_average_XX.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_moving_average_XX.i.t
+)
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT
+ ${generated_gengen_sources}
+ ${generated_gengen_includes}
+ ${generated_gengen_swigs}
+ DEPENDS ${generated_gengen_deps}
+ COMMAND ${PYTHON_EXECUTABLE} -B -c
+ \"import os, sys\;sys.path.append('${GR_CORE_PYTHONPATH}')\;sys.path.append('${CMAKE_CURRENT_SOURCE_DIR}')\;os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'\;from generate_all import generate_all\;generate_all()\"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ COMMENT "generating gengen files"
+)
+
+ADD_CUSTOM_TARGET(gengen_generated DEPENDS
+ ${generated_gengen_sources}
+ ${generated_gengen_includes}
+ ${generated_gengen_swigs}
+)
+
+########################################################################
+# Handle the generated sources + a few non-generated ones
+########################################################################
+LIST(APPEND gnuradio_core_sources
+ ${generated_gengen_sources}
+)
+
+INSTALL(FILES
+ ${generated_gengen_includes}
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_endianness.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_noise_type.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sig_source_waveform.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "core_devel"
+)
+
+IF(ENABLE_PYTHON)
+ INSTALL(FILES
+ ${generated_gengen_swigs}
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_endianness.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gengen.i
+ ${CMAKE_CURRENT_BINARY_DIR}/gengen_generated.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "core_swig"
+ )
+ENDIF(ENABLE_PYTHON)
diff --git a/gnuradio-core/src/lib/hier/CMakeLists.txt b/gnuradio-core/src/lib/hier/CMakeLists.txt
new file mode 100644
index 000000000..fb922f60e
--- /dev/null
+++ b/gnuradio-core/src/lib/hier/CMakeLists.txt
@@ -0,0 +1,42 @@
+# 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.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+
+LIST(APPEND gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_channel_model.cc
+)
+
+INSTALL(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_channel_model.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "core_devel"
+)
+
+IF(ENABLE_PYTHON)
+ INSTALL(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/hier.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_channel_model.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "core_swig"
+ )
+ENDIF(ENABLE_PYTHON)
diff --git a/gnuradio-core/src/lib/io/CMakeLists.txt b/gnuradio-core/src/lib/io/CMakeLists.txt
new file mode 100644
index 000000000..7ffe8306e
--- /dev/null
+++ b/gnuradio-core/src/lib/io/CMakeLists.txt
@@ -0,0 +1,108 @@
+# 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.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+
+########################################################################
+# Append gnuradio-core library sources
+########################################################################
+LIST(APPEND gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_histo_sink_f.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_oscope_guts.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_oscope_sink_f.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_oscope_sink_x.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/i2c.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/i2c_bitbang.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/i2c_bbio.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/i2c_bbio_pp.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/microtune_4702.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/microtune_4937.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/microtune_xxxx.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/ppio_ppdev.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_wavfile.cc
+)
+
+########################################################################
+# Install runtime headers
+########################################################################
+INSTALL(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_histo_sink_f.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_oscope_guts.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_oscope_sink_f.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_oscope_sink_x.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_trigger_mode.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/i2c.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/i2c_bitbang.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/i2c_bbio.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/i2c_bbio_pp.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/microtune_4702.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/microtune_4937.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/microtune_eval_board_defs.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/microtune_xxxx.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/ppio_ppdev.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gri_wavfile.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "core_devel"
+)
+
+########################################################################
+# Install swig headers
+########################################################################
+IF(ENABLE_PYTHON)
+INSTALL(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/io.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_histo_sink.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_oscope_sink.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "core_swig"
+)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Handle triple-threat files that have cc, h, and i
+########################################################################
+SET(gr_core_io_triple_threats
+ gr_file_sink
+ gr_file_sink_base
+ gr_file_source
+ gr_file_descriptor_sink
+ gr_file_descriptor_source
+ gr_message_sink
+ gr_message_source
+ microtune_xxxx_eval_board
+ microtune_4702_eval_board
+ microtune_4937_eval_board
+ ppio
+ sdr_1000
+ gr_udp_sink
+ gr_udp_source
+ gr_wavfile_source
+ gr_wavfile_sink
+ gr_tagged_file_sink
+)
+
+FOREACH(file_tt ${gr_core_io_triple_threats})
+ LIST(APPEND gnuradio_core_sources ${CMAKE_CURRENT_SOURCE_DIR}/${file_tt}.cc)
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${file_tt}.h DESTINATION ${GR_INCLUDE_DIR}/gnuradio COMPONENT "core_devel")
+ IF(ENABLE_PYTHON)
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${file_tt}.i DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig COMPONENT "core_swig")
+ ENDIF(ENABLE_PYTHON)
+ENDFOREACH(file_tt ${gr_core_io_triple_threats})
diff --git a/gnuradio-core/src/lib/missing/CMakeLists.txt b/gnuradio-core/src/lib/missing/CMakeLists.txt
new file mode 100644
index 000000000..fb4620452
--- /dev/null
+++ b/gnuradio-core/src/lib/missing/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Copyright 2010 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.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+
+LIST(APPEND gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/bug_work_around_8.cc
+)
+
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
+ LIST(APPEND gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/posix_memalign.cc
+ )
+ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
diff --git a/gnuradio-core/src/lib/reed-solomon/CMakeLists.txt b/gnuradio-core/src/lib/reed-solomon/CMakeLists.txt
new file mode 100644
index 000000000..4a495f9f9
--- /dev/null
+++ b/gnuradio-core/src/lib/reed-solomon/CMakeLists.txt
@@ -0,0 +1,55 @@
+# 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.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+IF(NOT MSVC) #FIXME can't build reed-solomon in MSVC.
+#The rs sources use a lot of non-standard code
+#like the array allocation and some c99 functions.
+#In short, will not fix unless someone asks nicely.
+SET(gr_core_rs_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/encode_rs.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/decode_rs.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/init_rs.c
+)
+
+########################################################################
+# Setup sources and includes
+########################################################################
+LIST(APPEND gnuradio_core_sources ${gr_core_rs_sources})
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/rs.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "core_devel"
+)
+
+########################################################################
+# Register unit tests
+########################################################################
+IF(ENABLE_TESTING)
+ADD_EXECUTABLE(gr_core_rstest
+ ${gr_core_rs_sources}
+ ${CMAKE_CURRENT_SOURCE_DIR}/rstest.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/exercise.c
+)
+ADD_TEST(gr-core-reed-solomon-test gr_core_rstest)
+ENDIF(ENABLE_TESTING)
+ENDIF(NOT MSVC)
diff --git a/gnuradio-core/src/lib/runtime/CMakeLists.txt b/gnuradio-core/src/lib/runtime/CMakeLists.txt
new file mode 100644
index 000000000..4b1f85bbe
--- /dev/null
+++ b/gnuradio-core/src/lib/runtime/CMakeLists.txt
@@ -0,0 +1,162 @@
+# Copyright 2010-2010 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.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+
+########################################################################
+# Append gnuradio-core library sources
+########################################################################
+LIST(APPEND gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_basic_block.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_flowgraph.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_flat_flowgraph.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_block.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_block_detail.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_block_executor.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_hier_block2.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_hier_block2_detail.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_buffer.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_dispatcher.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_error_handler.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_io_signature.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_local_sighandler.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_message.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_msg_accepter.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_msg_handler.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_msg_queue.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_pagesize.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_preferences.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_realtime.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_scheduler.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_scheduler_sts.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_scheduler_tpb.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_single_threaded_scheduler.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sptr_magic.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sync_block.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sync_decimator.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sync_interpolator.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sys_paths.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_top_block.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_top_block_impl.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_tpb_detail.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_tpb_thread_body.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vmcircbuf.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vmcircbuf_mmap_shm_open.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vmcircbuf_mmap_tmpfile.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vmcircbuf_createfilemapping.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vmcircbuf_sysv_shm.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_select_handler.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_tag_info.cc
+)
+
+########################################################################
+# Append gnuradio-core test sources
+########################################################################
+LIST(APPEND test_gnuradio_core_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_block.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_hier_block2.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_hier_block2_derived.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_buffer.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_flowgraph.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_top_block.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_io_signature.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_vmcircbuf.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_block_tags.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_runtime.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_set_msg_handler.cc
+)
+
+########################################################################
+# Install runtime headers
+########################################################################
+INSTALL(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_basic_block.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_flowgraph.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_flat_flowgraph.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_block.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_block_detail.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_block_executor.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_hier_block2.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_hier_block2_detail.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_buffer.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_complex.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_dispatcher.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_error_handler.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_io_signature.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_local_sighandler.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_message.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_msg_accepter.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_msg_handler.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_msg_queue.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_pagesize.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_preferences.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_realtime.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_runtime_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_scheduler.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_scheduler_sts.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_scheduler_tpb.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_select_handler.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_single_threaded_scheduler.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sptr_magic.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sync_block.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sync_decimator.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sync_interpolator.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_top_block.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_top_block_impl.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_tpb_detail.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_tpb_thread_body.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_timer.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sys_paths.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_unittests.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_vmcircbuf.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_tag_info.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "core_devel"
+)
+
+########################################################################
+# Install swig headers
+########################################################################
+IF(ENABLE_PYTHON)
+INSTALL(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_basic_block.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_block.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_block_detail.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_hier_block2.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_buffer.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_dispatcher.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_error_handler.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_io_signature.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_message.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_msg_handler.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_msg_queue.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_realtime.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_single_threaded_scheduler.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sync_block.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sync_decimator.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_sync_interpolator.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr_top_block.i
+ ${CMAKE_CURRENT_SOURCE_DIR}/runtime.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "core_swig"
+)
+ENDIF(ENABLE_PYTHON)
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/viterbi/CMakeLists.txt b/gnuradio-core/src/lib/viterbi/CMakeLists.txt
new file mode 100644
index 000000000..aeb8a012d
--- /dev/null
+++ b/gnuradio-core/src/lib/viterbi/CMakeLists.txt
@@ -0,0 +1,63 @@
+# 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.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+
+SET(viterbi_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/metrics.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/tab.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/viterbi.c
+)
+
+########################################################################
+# define missing erf function with C linkage (hack for metrics.c)
+########################################################################
+IF(MSVC)
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/boost_math_erf.cc "
+#include <boost/math/special_functions/erf.hpp>
+extern \"C\" double erf(double x){
+ return boost::math::erf(x);
+}
+")
+LIST(APPEND viterbi_sources ${CMAKE_CURRENT_BINARY_DIR}/boost_math_erf.cc)
+ENDIF(MSVC)
+
+########################################################################
+# Append gnuradio-core library sources
+########################################################################
+LIST(APPEND gnuradio_core_sources ${viterbi_sources})
+
+########################################################################
+# Install runtime headers
+########################################################################
+INSTALL(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/viterbi.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "core_devel"
+)
+
+########################################################################
+# Create some text executables (not registered tests)
+# Its not much to build so the sources are just re-listed,
+# rather than create a new library just for these two apps.
+########################################################################
+#ADD_EXECUTABLE(viterbi_encode ${CMAKE_CURRENT_SOURCE_DIR}/encode.cc ${viterbi_sources})
+#ADD_EXECUTABLE(viterbi_decode ${CMAKE_CURRENT_SOURCE_DIR}/decode.cc ${viterbi_sources})
diff --git a/gnuradio-core/src/python/gnuradio/CMakeLists.txt b/gnuradio-core/src/python/gnuradio/CMakeLists.txt
new file mode 100644
index 000000000..a65b01806
--- /dev/null
+++ b/gnuradio-core/src/python/gnuradio/CMakeLists.txt
@@ -0,0 +1,43 @@
+# 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)
+
+ADD_SUBDIRECTORY(gr)
+ADD_SUBDIRECTORY(gru)
+ADD_SUBDIRECTORY(gruimpl)
+ADD_SUBDIRECTORY(blks2)
+ADD_SUBDIRECTORY(blks2impl)
+
+GR_PYTHON_INSTALL(FILES
+ __init__.py
+ eng_notation.py
+ eng_option.py
+ modulation_utils.py
+ modulation_utils2.py
+ ofdm_packet_utils.py
+ packet_utils.py
+ gr_unittest.py
+ gr_xmlrunner.py
+ optfir.py
+ usrp_options.py
+ window.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio
+ COMPONENT "core_python"
+)
diff --git a/gnuradio-core/src/python/gnuradio/blks2/CMakeLists.txt b/gnuradio-core/src/python/gnuradio/blks2/CMakeLists.txt
new file mode 100644
index 000000000..3e210100b
--- /dev/null
+++ b/gnuradio-core/src/python/gnuradio/blks2/CMakeLists.txt
@@ -0,0 +1,26 @@
+# 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)
+
+GR_PYTHON_INSTALL(
+ FILES __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/blks2
+ COMPONENT "core_python"
+)
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/CMakeLists.txt b/gnuradio-core/src/python/gnuradio/blks2impl/CMakeLists.txt
new file mode 100644
index 000000000..235cf35be
--- /dev/null
+++ b/gnuradio-core/src/python/gnuradio/blks2impl/CMakeLists.txt
@@ -0,0 +1,66 @@
+# 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)
+
+GR_PYTHON_INSTALL(FILES
+ __init__.py
+ am_demod.py
+ channel_model.py
+ dbpsk.py
+ dbpsk2.py
+ dqpsk.py
+ dqpsk2.py
+ d8psk.py
+ filterbank.py
+ fm_demod.py
+ fm_emph.py
+ generic_usrp.py
+ gmsk.py
+ cpm.py
+ logpwrfft.py
+ nbfm_rx.py
+ nbfm_tx.py
+ ofdm.py
+ ofdm_receiver.py
+ ofdm_sync_fixed.py
+ ofdm_sync_pn.py
+ ofdm_sync_pnac.py
+ ofdm_sync_ml.py
+ pfb_arb_resampler.py
+ pfb_channelizer.py
+ pfb_decimator.py
+ pfb_interpolator.py
+ pkt.py
+ psk.py
+ qam.py
+ qam8.py
+ qam16.py
+ qam64.py
+ qam256.py
+ rational_resampler.py
+ standard_squelch.py
+ stream_to_vector_decimator.py
+ wfm_rcv.py
+ wfm_rcv_fmdet.py
+ wfm_rcv_pll.py
+ wfm_tx.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/blks2impl
+ COMPONENT "core_python"
+)
diff --git a/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt b/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt
new file mode 100644
index 000000000..bd7541a19
--- /dev/null
+++ b/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt
@@ -0,0 +1,52 @@
+# 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)
+
+GR_PYTHON_INSTALL(FILES
+ __init__.py
+ exceptions.py
+ gr_threading.py
+ gr_threading_23.py
+ gr_threading_24.py
+ hier_block2.py
+ prefs.py
+ top_block.py
+ pubsub.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/gr
+ COMPONENT "core_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
+ )
+ SET(GR_TEST_TARGET_DEPS gruel gnuradio-core)
+ GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file})
+ENDFOREACH(py_qa_test_file)
+ENDIF(ENABLE_TESTING)
diff --git a/gnuradio-core/src/python/gnuradio/gru/CMakeLists.txt b/gnuradio-core/src/python/gnuradio/gru/CMakeLists.txt
new file mode 100644
index 000000000..55971ce5b
--- /dev/null
+++ b/gnuradio-core/src/python/gnuradio/gru/CMakeLists.txt
@@ -0,0 +1,26 @@
+# 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)
+
+GR_PYTHON_INSTALL(
+ FILES __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/gru
+ COMPONENT "core_python"
+)
diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/CMakeLists.txt b/gnuradio-core/src/python/gnuradio/gruimpl/CMakeLists.txt
new file mode 100644
index 000000000..1863e96fd
--- /dev/null
+++ b/gnuradio-core/src/python/gnuradio/gruimpl/CMakeLists.txt
@@ -0,0 +1,39 @@
+# 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)
+
+GR_PYTHON_INSTALL(FILES
+ __init__.py
+ crc.py
+ freqz.py
+ gnuplot_freqz.py
+ hexint.py
+ listmisc.py
+ mathmisc.py
+ lmx2306.py
+ msgq_runner.py
+ os_read_exactly.py
+ sdr_1000.py
+ seq_with_cursor.py
+ socket_stuff.py
+ daemon.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/gruimpl
+ COMPONENT "core_python"
+)
diff --git a/gnuradio-core/src/tests/CMakeLists.txt b/gnuradio-core/src/tests/CMakeLists.txt
new file mode 100644
index 000000000..46f9e630d
--- /dev/null
+++ b/gnuradio-core/src/tests/CMakeLists.txt
@@ -0,0 +1,71 @@
+# 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(GrMiscUtils) #check n def
+GR_CHECK_HDR_N_DEF(sys/resource.h HAVE_SYS_RESOURCE_H)
+
+ADD_DEFINITIONS(${GR_COMMON_FLAGS_AND_DEFINES})
+
+########################################################################
+# Setup the include and linker paths
+########################################################################
+INCLUDE_DIRECTORIES(${GRUEL_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${GNURADIO_CORE_INCLUDE_DIRS})
+
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+INCLUDE_DIRECTORIES(${CPPUNIT_INCLUDE_DIRS})
+LINK_DIRECTORIES(${CPPUNIT_LIBRARY_DIRS})
+
+########################################################################
+# Build benchmarks and non-registered tests
+########################################################################
+SET(tests_not_run #single source per test
+ benchmark_dotprod_fff.cc
+ benchmark_dotprod_fsf.cc
+ benchmark_dotprod_ccf.cc
+ benchmark_dotprod_fcc.cc
+ benchmark_dotprod_scc.cc
+ benchmark_dotprod_ccc.cc
+ benchmark_nco.cc
+ benchmark_vco.cc
+ test_runtime.cc
+ test_general.cc
+ test_filter.cc
+ #test_atsc.cc
+ test_vmcircbuf.cc
+)
+
+FOREACH(test_not_run_src ${tests_not_run})
+ GET_FILENAME_COMPONENT(name ${test_not_run_src} NAME_WE)
+ ADD_EXECUTABLE(${name} ${test_not_run_src})
+ TARGET_LINK_LIBRARIES(${name} test-gnuradio-core)
+ENDFOREACH(test_not_run_src)
+
+########################################################################
+# Build the test-all test to end all tests
+# Set the test environment so the build libs will be found under MSVC.
+########################################################################
+INCLUDE(GrTest)
+SET(GR_TEST_TARGET_DEPS gruel gnuradio-core test-gnuradio-core)
+ADD_EXECUTABLE(gr_core_test_all test_all.cc)
+TARGET_LINK_LIBRARIES(gr_core_test_all test-gnuradio-core)
+GR_ADD_TEST(gr-core-test-all gr_core_test_all)
diff --git a/gr-audio/CMakeLists.txt b/gr-audio/CMakeLists.txt
new file mode 100644
index 000000000..d44397c02
--- /dev/null
+++ b/gr-audio/CMakeLists.txt
@@ -0,0 +1,101 @@
+# 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-audio" ENABLE_GR_AUDIO
+ Boost_FOUND
+ ENABLE_GR_CORE_
+)
+
+GR_SET_GLOBAL(GR_AUDIO_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_GR_AUDIO)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_SET(CPACK_COMPONENT_GROUP_AUDIO_DESCRIPTION "The GNU Radio Audio Blocks")
+
+CPACK_COMPONENT("audio_runtime"
+ GROUP "Audio"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Runtime"
+ DEPENDS "core_runtime"
+)
+
+CPACK_COMPONENT("audio_devel"
+ GROUP "Audio"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+ DEPENDS "core_devel"
+)
+
+CPACK_COMPONENT("audio_python"
+ GROUP "Audio"
+ DISPLAY_NAME "Python"
+ DESCRIPTION "Python modules for runtime; GRC xml files"
+ DEPENDS "core_python;audio_runtime"
+)
+
+CPACK_COMPONENT("audio_swig"
+ GROUP "Audio"
+ DISPLAY_NAME "SWIG"
+ DESCRIPTION "SWIG development .i files"
+ DEPENDS "core_swig;audio_python;audio_devel"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(include)
+ADD_SUBDIRECTORY(lib)
+ADD_SUBDIRECTORY(examples/c++)
+IF(ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(swig)
+ ADD_SUBDIRECTORY(grc)
+ ADD_SUBDIRECTORY(examples/python)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Create Pkg Config File
+########################################################################
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-audio.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-audio.pc
+@ONLY)
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-audio.pc
+ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
+ COMPONENT "audio_devel"
+)
+
+ENDIF(ENABLE_GR_AUDIO)
diff --git a/gr-audio/examples/c++/CMakeLists.txt b/gr-audio/examples/c++/CMakeLists.txt
new file mode 100644
index 000000000..07b5426de
--- /dev/null
+++ b/gr-audio/examples/c++/CMakeLists.txt
@@ -0,0 +1,23 @@
+# 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.
+
+INCLUDE_DIRECTORIES(${GR_AUDIO_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${GNURADIO_CORE_INCLUDE_DIRS})
+ADD_EXECUTABLE(dial_tone dial_tone.cc)
+TARGET_LINK_LIBRARIES(dial_tone gnuradio-audio)
diff --git a/gr-audio/examples/python/CMakeLists.txt b/gr-audio/examples/python/CMakeLists.txt
new file mode 100644
index 000000000..c5ca2bba0
--- /dev/null
+++ b/gr-audio/examples/python/CMakeLists.txt
@@ -0,0 +1,37 @@
+# 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.
+
+INCLUDE(GrPython)
+
+GR_PYTHON_INSTALL(PROGRAMS
+ audio_copy.py
+ audio_fft.py
+ audio_play.py
+ audio_to_file.py
+ dial_tone.py
+ dial_tone_daemon.py
+ dial_tone_wav.py
+ mono_tone.py
+ multi_tone.py
+ noise.py
+ spectrum_inversion.py
+ test_resampler.py
+ DESTINATION ${GR_PKG_DATA_DIR}/examples/audio
+ COMPONENT "audio_python"
+)
diff --git a/gr-audio/grc/CMakeLists.txt b/gr-audio/grc/CMakeLists.txt
new file mode 100644
index 000000000..067761fed
--- /dev/null
+++ b/gr-audio/grc/CMakeLists.txt
@@ -0,0 +1,22 @@
+# 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.
+
+########################################################################
+FILE(GLOB xml_files "*.xml")
+INSTALL(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "audio_python")
diff --git a/gr-audio/include/CMakeLists.txt b/gr-audio/include/CMakeLists.txt
new file mode 100644
index 000000000..9b7ed46c9
--- /dev/null
+++ b/gr-audio/include/CMakeLists.txt
@@ -0,0 +1,29 @@
+# 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
+ gr_audio_api.h
+ gr_audio_source.h
+ gr_audio_sink.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "audio_devel"
+)
diff --git a/gr-audio/lib/CMakeLists.txt b/gr-audio/lib/CMakeLists.txt
new file mode 100644
index 000000000..f5cafb7b3
--- /dev/null
+++ b/gr-audio/lib/CMakeLists.txt
@@ -0,0 +1,159 @@
+# 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_AUDIO_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+LIST(APPEND gr_audio_libs gnuradio-core ${Boost_LIBRARIES})
+LIST(APPEND gr_audio_sources gr_audio_registry.cc)
+LIST(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/gr-audio.conf)
+
+########################################################################
+## ALSA Support
+########################################################################
+FIND_PACKAGE(ALSA)
+
+IF(ALSA_FOUND)
+
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/alsa ${ALSA_INCLUDE_DIRS})
+ LIST(APPEND gr_audio_libs ${ALSA_LIBRARIES})
+ LIST(APPEND gr_audio_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/alsa/gri_alsa.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/alsa/audio_alsa_source.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/alsa/audio_alsa_sink.cc
+ )
+ LIST(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/alsa/gr-audio-alsa.conf)
+
+ENDIF(ALSA_FOUND)
+
+########################################################################
+## OSS Support
+########################################################################
+FIND_PACKAGE(OSS)
+
+IF(OSS_FOUND)
+
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/oss ${OSS_INCLUDE_DIRS})
+ LIST(APPEND gr_audio_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/oss/audio_oss_source.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/oss/audio_oss_sink.cc
+ )
+ LIST(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/oss/gr-audio-oss.conf)
+
+ENDIF(OSS_FOUND)
+
+
+########################################################################
+## Jack Support
+########################################################################
+FIND_PACKAGE(Jack)
+
+IF(JACK_FOUND)
+
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/jack ${JACK_INCLUDE_DIRS})
+ LIST(APPEND gr_audio_libs ${JACK_LIBRARIES})
+ ADD_DEFINITIONS(${JACK_DEFINITIONS})
+ LIST(APPEND gr_audio_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/jack/gri_jack.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/jack/audio_jack_source.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/jack/audio_jack_sink.cc
+ )
+ LIST(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/jack/gr-audio-jack.conf)
+
+ENDIF(JACK_FOUND)
+
+########################################################################
+## OSX Support
+########################################################################
+INCLUDE(CheckIncludeFileCXX)
+CHECK_INCLUDE_FILE_CXX(AudioUnit/AudioUnit.h AUDIO_UNIT_H)
+CHECK_INCLUDE_FILE_CXX(AudioToolbox/AudioToolbox.h AUDIO_TOOLBOX_H)
+
+IF(AUDIO_UNIT_H AND AUDIO_TOOLBOX_H)
+
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/osx)
+ LIST(APPEND gr_audio_libs
+ -framework AudioUnit
+ -framework CoreAudio
+ -framework AudioToolbox
+ )
+ LIST(APPEND gr_audio_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/osx/audio_osx_source.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/osx/audio_osx_sink.cc
+ )
+
+ENDIF(AUDIO_UNIT_H AND AUDIO_TOOLBOX_H)
+
+########################################################################
+## PortAudio Support
+########################################################################
+FIND_PACKAGE(Portaudio)
+
+IF(PORTAUDIO_FOUND)
+
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/portaudio ${PORTAUDIO_INCLUDE_DIRS})
+ LIST(APPEND gr_audio_libs ${PORTAUDIO_LIBRARIES})
+ ADD_DEFINITIONS(${PORTAUDIO_DEFINITIONS})
+ LIST(APPEND gr_audio_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/gri_portaudio.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/audio_portaudio_source.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/audio_portaudio_sink.cc
+ )
+ LIST(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/gr-audio-portaudio.conf)
+
+ENDIF(PORTAUDIO_FOUND)
+
+########################################################################
+## Windows Support
+########################################################################
+IF(WIN32)
+
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/windows)
+ LIST(APPEND gr_audio_libs winmm.lib)
+ LIST(APPEND gr_audio_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/windows/audio_windows_source.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/windows/audio_windows_sink.cc
+ )
+
+ENDIF(WIN32)
+
+########################################################################
+# Setup library
+########################################################################
+ADD_LIBRARY(gnuradio-audio SHARED ${gr_audio_sources})
+TARGET_LINK_LIBRARIES(gnuradio-audio ${gr_audio_libs})
+SET_TARGET_PROPERTIES(gnuradio-audio PROPERTIES DEFINE_SYMBOL "gnuradio_audio_EXPORTS")
+SET_TARGET_PROPERTIES(gnuradio-audio PROPERTIES SOVERSION ${LIBVER})
+
+INSTALL(TARGETS gnuradio-audio
+ LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "audio_runtime" # .so/.dylib file
+ ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "audio_devel" # .lib file
+ RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "audio_runtime" # .dll file
+)
+
+INSTALL(FILES ${gr_audio_confs} DESTINATION ${GR_PKG_CONF_DIR} COMPONENT "audio_runtime")
diff --git a/gr-audio/swig/CMakeLists.txt b/gr-audio/swig/CMakeLists.txt
new file mode 100644
index 000000000..a113239e9
--- /dev/null
+++ b/gr-audio/swig/CMakeLists.txt
@@ -0,0 +1,51 @@
+# 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_AUDIO_INCLUDE_DIRS}
+ ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
+)
+
+SET(GR_SWIG_LIBRARIES gnuradio-audio)
+
+GR_SWIG_MAKE(audio_swig audio_swig.i)
+
+GR_SWIG_INSTALL(
+ TARGETS audio_swig
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/audio
+ COMPONENT "audio_python"
+)
+
+INSTALL(
+ FILES audio_swig.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "audio_swig"
+)
+
+GR_PYTHON_INSTALL(
+ FILES __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/audio
+ COMPONENT "audio_python"
+)
diff --git a/gr-noaa/CMakeLists.txt b/gr-noaa/CMakeLists.txt
new file mode 100644
index 000000000..a5f3eae30
--- /dev/null
+++ b/gr-noaa/CMakeLists.txt
@@ -0,0 +1,90 @@
+# 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-noaa" ENABLE_GR_NOAA
+ 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_NOAA_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/lib
+)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_GR_NOAA)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_SET(CPACK_COMPONENT_GROUP_NOAA_DESCRIPTION "The GNU Radio NOAA Blocks")
+
+CPACK_COMPONENT("noaa_runtime"
+ GROUP "NOAA"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Runtime"
+ DEPENDS "core_runtime"
+)
+
+CPACK_COMPONENT("noaa_devel"
+ GROUP "NOAA"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+ DEPENDS "core_devel"
+)
+
+CPACK_COMPONENT("noaa_python"
+ GROUP "NOAA"
+ DISPLAY_NAME "Python"
+ DESCRIPTION "Python modules for runtime; GRC xml files"
+ DEPENDS "core_python;noaa_runtime"
+)
+
+CPACK_COMPONENT("noaa_swig"
+ GROUP "NOAA"
+ DISPLAY_NAME "SWIG"
+ DESCRIPTION "SWIG development .i files"
+ DEPENDS "core_swig;noaa_python;noaa_devel"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(lib)
+IF(ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(swig)
+ ADD_SUBDIRECTORY(grc)
+ ADD_SUBDIRECTORY(apps)
+ENDIF(ENABLE_PYTHON)
+
+ENDIF(ENABLE_GR_NOAA)
diff --git a/gr-noaa/apps/.gitignore b/gr-noaa/apps/.gitignore
index cd8d543cc..be02dd265 100644
--- a/gr-noaa/apps/.gitignore
+++ b/gr-noaa/apps/.gitignore
@@ -1,3 +1,3 @@
*.dat
-*.txt
+#*.txt
*.hrpt
diff --git a/gr-noaa/apps/CMakeLists.txt b/gr-noaa/apps/CMakeLists.txt
new file mode 100644
index 000000000..8ec45eb7d
--- /dev/null
+++ b/gr-noaa/apps/CMakeLists.txt
@@ -0,0 +1,33 @@
+# 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.
+
+INCLUDE(GrPython)
+
+GR_PYTHON_INSTALL(
+ PROGRAMS
+ hrpt_decode.py
+ hrpt_demod.py
+ file_rx_hrpt.py
+ file_rx_lrit.py
+ #usrp_rx_hrpt.py #FIXME no support for usrp
+ #usrp_rx_hrpt_nogui.py
+ #usrp_rx_lrit.py
+ DESTINATION ${GR_RUNTIME_DIR}
+ COMPONENT "noaa_python"
+)
diff --git a/gr-noaa/grc/CMakeLists.txt b/gr-noaa/grc/CMakeLists.txt
new file mode 100644
index 000000000..99f8bc837
--- /dev/null
+++ b/gr-noaa/grc/CMakeLists.txt
@@ -0,0 +1,26 @@
+# 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
+ noaa_hrpt_decoder.xml
+ noaa_hrpt_deframer.xml
+ noaa_hrpt_pll_cf.xml
+ DESTINATION ${GRC_BLOCKS_DIR}
+ COMPONENT "noaa_python"
+)
diff --git a/gr-noaa/lib/CMakeLists.txt b/gr-noaa/lib/CMakeLists.txt
new file mode 100644
index 000000000..41c973419
--- /dev/null
+++ b/gr-noaa/lib/CMakeLists.txt
@@ -0,0 +1,65 @@
+# 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_NOAA_INCLUDE_DIRS}
+)
+
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+########################################################################
+# Setup library
+########################################################################
+LIST(APPEND gr_noaa_sources
+ noaa_hrpt_decoder.cc
+ noaa_hrpt_deframer.cc
+ noaa_hrpt_pll_cf.cc
+)
+
+LIST(APPEND noaa_libs
+ gnuradio-core
+ ${Boost_LIBRARIES}
+)
+
+ADD_LIBRARY(gnuradio-noaa SHARED ${gr_noaa_sources})
+TARGET_LINK_LIBRARIES(gnuradio-noaa ${noaa_libs})
+SET_TARGET_PROPERTIES(gnuradio-noaa PROPERTIES DEFINE_SYMBOL "gnuradio_noaa_EXPORTS")
+SET_TARGET_PROPERTIES(gnuradio-noaa PROPERTIES SOVERSION ${LIBVER})
+
+INSTALL(TARGETS gnuradio-noaa
+ LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "noaa_runtime" # .so/.dylib file
+ ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "noaa_devel" # .lib file
+ RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "noaa_runtime" # .dll file
+)
+
+########################################################################
+# Install header files
+########################################################################
+INSTALL(FILES
+ noaa_hrpt_decoder.h
+ noaa_hrpt_deframer.h
+ noaa_hrpt_pll_cf.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "noaa_devel"
+)
diff --git a/gr-noaa/swig/CMakeLists.txt b/gr-noaa/swig/CMakeLists.txt
new file mode 100644
index 000000000..8b8afcb6f
--- /dev/null
+++ b/gr-noaa/swig/CMakeLists.txt
@@ -0,0 +1,56 @@
+# 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_NOAA_INCLUDE_DIRS}
+ ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
+)
+
+SET(GR_SWIG_LIBRARIES gnuradio-noaa)
+
+GR_SWIG_MAKE(noaa_swig noaa_swig.i)
+
+GR_SWIG_INSTALL(
+ TARGETS noaa_swig
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/noaa
+ COMPONENT "noaa_python"
+)
+
+INSTALL(
+ FILES
+ noaa_swig.i
+ noaa_hrpt_decoder.i
+ noaa_hrpt_deframer.i
+ noaa_hrpt_pll_cf.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "noaa_swig"
+)
+
+GR_PYTHON_INSTALL(
+ FILES
+ __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/noaa
+ COMPONENT "noaa_python"
+)
diff --git a/gr-pager/CMakeLists.txt b/gr-pager/CMakeLists.txt
new file mode 100644
index 000000000..e5c3a3396
--- /dev/null
+++ b/gr-pager/CMakeLists.txt
@@ -0,0 +1,105 @@
+# 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-pager" ENABLE_GR_PAGER
+ 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_PAGER_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/lib
+)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_GR_PAGER)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_SET(CPACK_COMPONENT_GROUP_PAGER_DESCRIPTION "The GNU Radio Pager Blocks")
+
+CPACK_COMPONENT("pager_runtime"
+ GROUP "Pager"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Runtime"
+ DEPENDS "core_runtime"
+)
+
+CPACK_COMPONENT("pager_devel"
+ GROUP "Pager"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+ DEPENDS "core_devel"
+)
+
+CPACK_COMPONENT("pager_python"
+ GROUP "Pager"
+ DISPLAY_NAME "Python"
+ DESCRIPTION "Python modules for runtime; GRC xml files"
+ DEPENDS "core_python;pager_runtime"
+)
+
+CPACK_COMPONENT("pager_swig"
+ GROUP "Pager"
+ DISPLAY_NAME "SWIG"
+ DESCRIPTION "SWIG development .i files"
+ DEPENDS "core_swig;pager_python;pager_devel"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(lib)
+IF(ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(python)
+ ADD_SUBDIRECTORY(swig)
+ ADD_SUBDIRECTORY(grc)
+ ADD_SUBDIRECTORY(apps)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Create Pkg Config File
+########################################################################
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-pager.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-pager.pc
+@ONLY)
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-pager.pc
+ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
+ COMPONENT "pager_devel"
+)
+
+ENDIF(ENABLE_GR_PAGER)
diff --git a/gr-pager/apps/CMakeLists.txt b/gr-pager/apps/CMakeLists.txt
new file mode 100644
index 000000000..4b7cd54fa
--- /dev/null
+++ b/gr-pager/apps/CMakeLists.txt
@@ -0,0 +1,22 @@
+# 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.
+
+#FIXME
+#not bothering to install because the apps require gr-usrp
+#which we are choosing not to support in the cmake build system
diff --git a/gr-pager/grc/CMakeLists.txt b/gr-pager/grc/CMakeLists.txt
new file mode 100644
index 000000000..a9c39c4c4
--- /dev/null
+++ b/gr-pager/grc/CMakeLists.txt
@@ -0,0 +1,26 @@
+# 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
+ pager_slicer_fb.xml
+ pager_flex_sync.xml
+ pager_flex_deinterleave.xml
+ DESTINATION ${GRC_BLOCKS_DIR}
+ COMPONENT "pager_python"
+)
diff --git a/gr-pager/lib/CMakeLists.txt b/gr-pager/lib/CMakeLists.txt
new file mode 100644
index 000000000..40aec57c8
--- /dev/null
+++ b/gr-pager/lib/CMakeLists.txt
@@ -0,0 +1,75 @@
+# 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_PAGER_INCLUDE_DIRS}
+)
+
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+########################################################################
+# Setup library
+########################################################################
+LIST(APPEND gr_pager_sources
+ pager_flex_frame.cc
+ pager_slicer_fb.cc
+ pager_flex_sync.cc
+ pager_flex_deinterleave.cc
+ pager_flex_parse.cc
+ pageri_bch3221.cc
+ pageri_flex_modes.cc
+ pageri_util.cc
+)
+
+LIST(APPEND pager_libs
+ gnuradio-core
+ ${Boost_LIBRARIES}
+)
+
+ADD_LIBRARY(gnuradio-pager SHARED ${gr_pager_sources})
+TARGET_LINK_LIBRARIES(gnuradio-pager ${pager_libs})
+SET_TARGET_PROPERTIES(gnuradio-pager PROPERTIES DEFINE_SYMBOL "gnuradio_pager_EXPORTS")
+SET_TARGET_PROPERTIES(gnuradio-pager PROPERTIES SOVERSION ${LIBVER})
+
+INSTALL(TARGETS gnuradio-pager
+ LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "pager_runtime" # .so/.dylib file
+ ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "pager_devel" # .lib file
+ RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "pager_runtime" # .dll file
+)
+
+########################################################################
+# Install header files
+########################################################################
+INSTALL(FILES
+ pager_slicer_fb.h
+ pager_flex_sync.h
+ pager_flex_deinterleave.h
+ pager_flex_parse.h
+ pager_flex_frame.h
+ pageri_bch3221.h
+ pageri_flex_modes.h
+ pageri_util.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "pager_devel"
+)
diff --git a/gr-pager/python/CMakeLists.txt b/gr-pager/python/CMakeLists.txt
new file mode 100644
index 000000000..26fbf6f09
--- /dev/null
+++ b/gr-pager/python/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.
+
+########################################################################
+INCLUDE(GrPython)
+
+GR_PYTHON_INSTALL(
+ FILES
+ __init__.py
+ pager_utils.py
+ flex_demod.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/pager
+ COMPONENT "pager_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-pager/python
+ ${CMAKE_BINARY_DIR}/gr-pager/swig
+ )
+ SET(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-pager)
+ 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-pager/swig/CMakeLists.txt b/gr-pager/swig/CMakeLists.txt
new file mode 100644
index 000000000..24cab0c9a
--- /dev/null
+++ b/gr-pager/swig/CMakeLists.txt
@@ -0,0 +1,51 @@
+# 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_PAGER_INCLUDE_DIRS}
+ ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
+)
+
+SET(GR_SWIG_LIBRARIES gnuradio-pager)
+
+GR_SWIG_MAKE(pager_swig pager_swig.i)
+
+GR_SWIG_INSTALL(
+ TARGETS pager_swig
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/pager
+ COMPONENT "pager_python"
+)
+
+INSTALL(
+ FILES
+ pager_swig.i
+ pager_flex_deinterleave.i
+ pager_flex_frame.i
+ pager_flex_parse.i
+ pager_flex_sync.i
+ pager_slicer_fb.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "pager_swig"
+)
diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt
new file mode 100644
index 000000000..5252af36b
--- /dev/null
+++ b/gr-qtgui/CMakeLists.txt
@@ -0,0 +1,116 @@
+# 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.
+
+########################################################################
+# Setup dependencies
+########################################################################
+INCLUDE(GrBoost)
+
+FIND_PACKAGE(Qt4 4.2.0 COMPONENTS QtCore QtGui)
+INCLUDE(${QT_USE_FILE}) #sets up the environment
+
+FIND_PACKAGE(Qwt)
+
+FIND_PACKAGE(PythonLibs)
+
+INCLUDE(GrPython)
+GR_PYTHON_CHECK_MODULE("PyQt4" PyQt4 True PYQT4_FOUND)
+
+########################################################################
+# Register component
+########################################################################
+INCLUDE(GrComponent)
+GR_REGISTER_COMPONENT("gr-qtgui" ENABLE_GR_QTGUI
+ Boost_FOUND
+ QT4_FOUND
+ QWT_FOUND
+ ENABLE_GR_CORE_
+ PYTHONLIBS_FOUND
+ PYQT4_FOUND
+)
+
+GR_SET_GLOBAL(GR_QTGUI_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/lib
+ ${CMAKE_CURRENT_BINARY_DIR}/lib
+)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_GR_QTGUI)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_SET(CPACK_COMPONENT_GROUP_QTGUI_DESCRIPTION "The GNU Radio QtGUI Blocks")
+
+CPACK_COMPONENT("qtgui_runtime"
+ GROUP "QtGUI"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Runtime"
+ DEPENDS "core_runtime"
+)
+
+CPACK_COMPONENT("qtgui_devel"
+ GROUP "QtGUI"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+ DEPENDS "core_devel"
+)
+
+CPACK_COMPONENT("qtgui_python"
+ GROUP "QtGUI"
+ DISPLAY_NAME "Python"
+ DESCRIPTION "Python modules for runtime; GRC xml files"
+ DEPENDS "core_python;qtgui_runtime"
+)
+
+CPACK_COMPONENT("qtgui_swig"
+ GROUP "QtGUI"
+ DISPLAY_NAME "SWIG"
+ DESCRIPTION "SWIG development .i files"
+ DEPENDS "core_swig;qtgui_python;qtgui_devel"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(lib)
+IF(ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(grc)
+ ADD_SUBDIRECTORY(swig)
+ ADD_SUBDIRECTORY(python)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Create Pkg Config File
+########################################################################
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-qtgui.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-qtgui.pc
+@ONLY)
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-qtgui.pc
+ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
+ COMPONENT "qtgui_devel"
+)
+
+ENDIF(ENABLE_GR_QTGUI)
diff --git a/gr-qtgui/grc/CMakeLists.txt b/gr-qtgui/grc/CMakeLists.txt
new file mode 100644
index 000000000..023c38b01
--- /dev/null
+++ b/gr-qtgui/grc/CMakeLists.txt
@@ -0,0 +1,22 @@
+# 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.
+
+########################################################################
+FILE(GLOB xml_files "*.xml")
+INSTALL(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "qtgui_python")
diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt
new file mode 100644
index 000000000..5bc67573e
--- /dev/null
+++ b/gr-qtgui/lib/CMakeLists.txt
@@ -0,0 +1,120 @@
+# 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.
+
+########################################################################
+# Setup the QT file generations stuff
+########################################################################
+SET(qtgui_moc_hdrs
+ spectrumdisplayform.h
+ timedisplayform.h
+ FrequencyDisplayPlot.h
+ TimeDomainDisplayPlot.h
+ WaterfallDisplayPlot.h
+ ConstellationDisplayPlot.h
+)
+QT4_WRAP_CPP(qtgui_moc_srcs ${qtgui_moc_hdrs})
+QT4_WRAP_UI(qtgui_ui_hdrs spectrumdisplayform.ui)
+
+#FIXME the sources expect <foo>.ui.h, but the macros generate ui_foo.h
+#avoid changing the sources by generating the header with the include
+SET(spectrum_ui_hdr ${CMAKE_CURRENT_BINARY_DIR}/spectrumdisplayform.ui.h)
+IF(NOT EXISTS ${spectrum_ui_hdr})
+ FILE(WRITE ${spectrum_ui_hdr} "#include <ui_spectrumdisplayform.h>\n")
+ENDIF(NOT EXISTS ${spectrum_ui_hdr})
+
+SET(qtgui_srcs
+ ${qtgui_moc_srcs}
+ ${qtgui_ui_hdrs}
+ FrequencyDisplayPlot.cc
+ TimeDomainDisplayPlot.cc
+ WaterfallDisplayPlot.cc
+ waterfallGlobalData.cc
+ ConstellationDisplayPlot.cc
+ spectrumdisplayform.cc
+ timedisplayform.cc
+ SpectrumGUIClass.cc
+ spectrumUpdateEvents.cc
+ plot_waterfall.cc
+ qtgui_sink_c.cc
+ qtgui_sink_f.cc
+ qtgui_time_sink_c.cc
+ qtgui_time_sink_f.cc
+ qtgui_util.cc
+)
+
+########################################################################
+# Setup the include and linker paths
+########################################################################
+INCLUDE_DIRECTORIES(
+ ${GNURADIO_CORE_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+INCLUDE_DIRECTORIES(${QWT_INCLUDE_DIRS})
+LINK_DIRECTORIES(${QWT_LIBRARY_DIRS})
+
+INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
+
+########################################################################
+# Setup library
+########################################################################
+LIST(APPEND qtgui_libs
+ gnuradio-core
+ ${QT_LIBRARIES}
+ ${QWT_LIBRARIES}
+ ${PYTHON_LIBRARIES}
+)
+
+ADD_DEFINITIONS(-DQWT_DLL) #setup QWT library linkage
+ADD_LIBRARY(gnuradio-qtgui SHARED ${qtgui_srcs})
+TARGET_LINK_LIBRARIES(gnuradio-qtgui ${qtgui_libs})
+SET_TARGET_PROPERTIES(gnuradio-qtgui PROPERTIES DEFINE_SYMBOL "libgnuradio_qtgui_EXPORTS")
+SET_TARGET_PROPERTIES(gnuradio-qtgui PROPERTIES SOVERSION ${LIBVER})
+
+INSTALL(TARGETS gnuradio-qtgui
+ LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "qtgui_runtime" # .so/.dylib file
+ ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "qtgui_devel" # .lib file
+ RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "qtgui_runtime" # .dll file
+)
+
+########################################################################
+# Install the header files
+########################################################################
+INSTALL(FILES
+ FrequencyDisplayPlot.h
+ TimeDomainDisplayPlot.h
+ WaterfallDisplayPlot.h
+ waterfallGlobalData.h
+ ConstellationDisplayPlot.h
+ highResTimeFunctions.h
+ plot_waterfall.h
+ spectrumdisplayform.h
+ SpectrumGUIClass.h
+ spectrumUpdateEvents.h
+ qtgui_sink_c.h
+ qtgui_sink_f.h
+ qtgui_util.h
+ gr_qtgui_api.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "qtgui_devel"
+)
diff --git a/gr-qtgui/python/CMakeLists.txt b/gr-qtgui/python/CMakeLists.txt
new file mode 100644
index 000000000..e80fa6b75
--- /dev/null
+++ b/gr-qtgui/python/CMakeLists.txt
@@ -0,0 +1,46 @@
+# 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)
+
+GR_PYTHON_INSTALL(
+ FILES __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui
+ COMPONENT "qtgui_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-qtgui/python
+ ${CMAKE_BINARY_DIR}/gr-qtgui/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-qtgui/swig/CMakeLists.txt b/gr-qtgui/swig/CMakeLists.txt
new file mode 100644
index 000000000..047229944
--- /dev/null
+++ b/gr-qtgui/swig/CMakeLists.txt
@@ -0,0 +1,49 @@
+# 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.
+
+########################################################################
+# Setup swig generation
+########################################################################
+INCLUDE(GrPython)
+INCLUDE(GrSwig)
+
+SET(GR_SWIG_INCLUDE_DIRS
+ ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
+ ${GR_QTGUI_INCLUDE_DIRS}
+ ${QWT_INCLUDE_DIRS}
+)
+
+SET(GR_SWIG_LIBRARIES gnuradio-qtgui)
+
+GR_SWIG_MAKE(qtgui_swig qtgui_swig.i)
+
+GR_SWIG_INSTALL(
+ TARGETS qtgui_swig
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui
+ COMPONENT "qtgui_python"
+)
+
+INSTALL(FILES
+ qtgui_sink_c.i
+ qtgui_sink_f.i
+ qtgui_time_sink_c.i
+ qtgui_time_sink_f.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "qtgui_swig"
+)
diff --git a/gr-trellis/CMakeLists.txt b/gr-trellis/CMakeLists.txt
new file mode 100644
index 000000000..35277eda7
--- /dev/null
+++ b/gr-trellis/CMakeLists.txt
@@ -0,0 +1,118 @@
+# 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-trellis" ENABLE_GR_TRELLIS
+ 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_TRELLIS_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/lib
+ ${CMAKE_CURRENT_BINARY_DIR}/src/lib
+)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_GR_TRELLIS)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_SET(CPACK_COMPONENT_GROUP_TRELLIS_DESCRIPTION "The GNU Radio Trellis Blocks")
+
+CPACK_COMPONENT("trellis_docs"
+ GROUP "Trellis"
+ DISPLAY_NAME "Documentation"
+ DESCRIPTION "Doxygen HTML and XML"
+)
+
+CPACK_COMPONENT("trellis_runtime"
+ GROUP "Trellis"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Dynamic link libraries"
+ DEPENDS "core_runtime"
+)
+
+CPACK_COMPONENT("trellis_devel"
+ GROUP "Trellis"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+ DEPENDS "core_devel"
+)
+
+CPACK_COMPONENT("trellis_python"
+ GROUP "Trellis"
+ DISPLAY_NAME "Python"
+ DESCRIPTION "Python modules for runtime"
+ DEPENDS "core_python;trellis_runtime"
+)
+
+CPACK_COMPONENT("trellis_examples"
+ GROUP "Trellis"
+ DISPLAY_NAME "Examples"
+ DESCRIPTION "Python examples for trellis"
+ DEPENDS "trellis_python"
+)
+
+CPACK_COMPONENT("trellis_swig"
+ GROUP "Trellis"
+ DISPLAY_NAME "SWIG"
+ DESCRIPTION "SWIG development .i files"
+ DEPENDS "core_swig;trellis_python;trellis_devel"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(src/lib)
+ADD_SUBDIRECTORY(doc)
+IF(ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(src/python)
+ ADD_SUBDIRECTORY(src/examples)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Create Pkg Config File
+########################################################################
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-trellis.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-trellis.pc
+@ONLY)
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-trellis.pc
+ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
+ COMPONENT "trellis_devel"
+)
+
+ENDIF(ENABLE_GR_TRELLIS)
diff --git a/gr-trellis/doc/CMakeLists.txt b/gr-trellis/doc/CMakeLists.txt
new file mode 100644
index 000000000..41ccf7f8e
--- /dev/null
+++ b/gr-trellis/doc/CMakeLists.txt
@@ -0,0 +1,73 @@
+# 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.
+
+INCLUDE(GrPython)
+
+########################################################################
+# Generate HTML doc with xmlto
+########################################################################
+FIND_PROGRAM(XMLTO_EXECUTABLE xmlto)
+
+IF(XMLTO_EXECUTABLE)
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gr-trellis.html
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gr-trellis.xml
+ COMMAND ${XMLTO_EXECUTABLE} html-nochunks
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr-trellis.xml
+)
+ADD_CUSTOM_TARGET(gr_trellis_html ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gr-trellis.html)
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gr-trellis.html
+ DESTINATION ${GR_PKG_DOC_DIR}/html
+ COMPONENT "trellis_docs"
+
+)
+ENDIF(XMLTO_EXECUTABLE)
+
+########################################################################
+# Generate xml doc
+########################################################################
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test_tcm.py.xml
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/test_tcm.py
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_numbered_listing.py
+ COMMAND ${PYTHON_EXECUTABLE}
+ ${CMAKE_CURRENT_SOURCE_DIR}/make_numbered_listing.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/test_tcm.py
+)
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test_viterbi_equalization1.py.xml
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/test_viterbi_equalization1.py
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_numbered_listing.py
+ COMMAND ${PYTHON_EXECUTABLE}
+ ${CMAKE_CURRENT_SOURCE_DIR}/make_numbered_listing.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/test_viterbi_equalization1.py
+)
+
+ADD_CUSTOM_TARGET(gr_trellis_xml ALL DEPENDS
+ ${CMAKE_CURRENT_BINARY_DIR}/test_tcm.py.xml
+ ${CMAKE_CURRENT_BINARY_DIR}/test_viterbi_equalization1.py.xml
+)
+INSTALL(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/test_tcm.py.xml
+ ${CMAKE_CURRENT_BINARY_DIR}/test_viterbi_equalization1.py.xml
+ DESTINATION ${GR_PKG_DOC_DIR}/xml
+ COMPONENT "trellis_docs"
+)
diff --git a/gr-trellis/src/examples/CMakeLists.txt b/gr-trellis/src/examples/CMakeLists.txt
new file mode 100644
index 000000000..2a98c9c67
--- /dev/null
+++ b/gr-trellis/src/examples/CMakeLists.txt
@@ -0,0 +1,64 @@
+# 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.
+
+INCLUDE(GrPython)
+
+GR_PYTHON_INSTALL(
+ PROGRAMS
+ fsm_utils.py
+ test_tcm.py
+ test_tcm_parallel.py
+ test_tcm_combined.py
+ test_sccc_hard.py
+ test_sccc_soft.py
+ test_sccc_turbo.py
+ test_viterbi_equalization1.py
+ test_viterbi_equalization.py
+ test_turbo_equalization.py
+ test_turbo_equalization1.py
+ test_turbo_equalization2.py
+ DESTINATION ${GR_PKG_DATA_DIR}/examples/trellis
+ COMPONENT "trellis_examples"
+)
+
+INSTALL(
+ FILES README
+ DESTINATION ${GR_PKG_DATA_DIR}/examples/trellis
+ COMPONENT "trellis_examples"
+)
+
+INSTALL(
+ FILES
+ fsm_files/awgn1o2_128.fsm
+ fsm_files/awgn1o2_16.fsm
+ fsm_files/awgn1o2_4.fsm
+ fsm_files/awgn1o2_8.fsm
+ fsm_files/awgn2o3_16.fsm
+ fsm_files/awgn2o3_4.fsm
+ fsm_files/awgn2o3_4_msb.fsm
+ fsm_files/awgn2o3_4_msbG.fsm
+ fsm_files/awgn2o3_8.fsm
+ fsm_files/awgn2o4_4.fsm
+ fsm_files/disconnected.fsm
+ fsm_files/rep3.fsm
+ fsm_files/rep5.fsm
+ fsm_files/simple.fsm
+ DESTINATION ${GR_PKG_DATA_DIR}/examples/trellis/fsm_files
+ COMPONENT "trellis_examples"
+)
diff --git a/gr-trellis/src/lib/CMakeLists.txt b/gr-trellis/src/lib/CMakeLists.txt
new file mode 100644
index 000000000..eead40d4c
--- /dev/null
+++ b/gr-trellis/src/lib/CMakeLists.txt
@@ -0,0 +1,216 @@
+# 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_TRELLIS_INCLUDE_DIRS}
+ ${GR_DIGITAL_INCLUDE_DIRS}
+)
+
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+########################################################################
+# Generate the makefile.gen, then extract its sources:
+# This is a round-about way to extract the sources,
+# but it requires minimum changed to the python utils.
+#
+# The recommended way to do this:
+# - Make a generation macro that registers the sources command.
+# - List the generation macro with each templated source file.
+# - Create a python script (very generic) to perform generation.
+# - This way the targets would depend only on their sources.
+########################################################################
+EXECUTE_PROCESS(
+ COMMAND ${PYTHON_EXECUTABLE} -c "
+import os, sys
+sys.path.append('${GR_CORE_PYTHONPATH}')
+sys.path.append('${CMAKE_CURRENT_SOURCE_DIR}')
+os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+os.environ['do_makefile'] = '1'
+os.environ['do_sources'] = '0'
+from generate_all import generate_all
+generate_all()
+ " WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+MACRO(GEGEN_GEN_EXTRACT outvar ext)
+ EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import os; print ';'.join(
+ map(lambda x: os.path.join('${CMAKE_CURRENT_BINARY_DIR}', x.replace('\\\\', '').strip()),
+ filter(lambda f: '${ext}' in f, open('${CMAKE_CURRENT_SOURCE_DIR}/Makefile.gen').readlines()
+ )))" OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE ${outvar})
+ FILE(TO_CMAKE_PATH "${${outvar}}" ${outvar})
+ENDMACRO(GEGEN_GEN_EXTRACT)
+
+GEGEN_GEN_EXTRACT(generated_trellis_sources ".cc")
+GEGEN_GEN_EXTRACT(generated_trellis_includes ".h")
+GEGEN_GEN_EXTRACT(generated_trellis_swigs ".i")
+
+#TODO simplify this list with a triple-threat for loop
+SET(generated_trellis_deps
+ generate_all.py
+ generate_trellis.py
+ trellis_encoder_XX.cc.t
+ trellis_encoder_XX.h.t
+ trellis_encoder_XX.i.t
+ trellis_sccc_encoder_XX.cc.t
+ trellis_sccc_encoder_XX.h.t
+ trellis_sccc_encoder_XX.i.t
+ trellis_pccc_encoder_XX.cc.t
+ trellis_pccc_encoder_XX.h.t
+ trellis_pccc_encoder_XX.i.t
+ trellis_metrics_X.cc.t
+ trellis_metrics_X.h.t
+ trellis_metrics_X.i.t
+ trellis_viterbi_combined_XX.cc.t
+ trellis_viterbi_combined_XX.h.t
+ trellis_viterbi_combined_XX.i.t
+ trellis_sccc_decoder_combined_XX.cc.t
+ trellis_sccc_decoder_combined_XX.h.t
+ trellis_sccc_decoder_combined_XX.i.t
+ trellis_sccc_decoder_X.cc.t
+ trellis_sccc_decoder_X.h.t
+ trellis_sccc_decoder_X.i.t
+ trellis_pccc_decoder_X.cc.t
+ trellis_pccc_decoder_X.h.t
+ trellis_pccc_decoder_X.i.t
+ trellis_viterbi_X.cc.t
+ trellis_viterbi_X.h.t
+ trellis_viterbi_X.i.t
+)
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT
+ ${generated_trellis_sources}
+ ${generated_trellis_includes}
+ ${generated_trellis_swigs}
+ DEPENDS ${generated_trellis_deps}
+ COMMAND ${PYTHON_EXECUTABLE} -B -c
+ \"import os, sys\;sys.path.append('${GR_CORE_PYTHONPATH}')\;sys.path.append('${CMAKE_CURRENT_SOURCE_DIR}')\;os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'\;from generate_all import generate_all\;generate_all()\"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ COMMENT "generating trellis files"
+)
+
+ADD_CUSTOM_TARGET(trellis_generated DEPENDS
+ ${generated_trellis_sources}
+ ${generated_trellis_includes}
+ ${generated_trellis_swigs}
+)
+
+########################################################################
+# Setup library
+########################################################################
+LIST(APPEND gr_trellis_sources
+ fsm.cc
+ quicksort_index.cc
+ base.cc
+ interleaver.cc
+ calc_metric.cc
+ core_algorithms.cc
+ trellis_permutation.cc
+ trellis_siso_f.cc
+ trellis_siso_combined_f.cc
+ trellis_constellation_metrics_cf.cc
+ ${generated_trellis_sources}
+)
+
+LIST(APPEND trellis_libs
+ gnuradio-core
+ ${Boost_LIBRARIES}
+)
+
+ADD_LIBRARY(gnuradio-trellis SHARED ${gr_trellis_sources})
+TARGET_LINK_LIBRARIES(gnuradio-trellis ${trellis_libs})
+SET_TARGET_PROPERTIES(gnuradio-trellis PROPERTIES DEFINE_SYMBOL "gnuradio_trellis_EXPORTS")
+SET_TARGET_PROPERTIES(gnuradio-trellis PROPERTIES SOVERSION ${LIBVER})
+
+INSTALL(TARGETS gnuradio-trellis
+ LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "trellis_runtime" # .so/.dylib file
+ ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "trellis_devel" # .lib file
+ RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "trellis_runtime" # .dll file
+)
+
+########################################################################
+# Handle the generated sources + a few non-generated ones
+########################################################################
+INSTALL(FILES
+ ${generated_trellis_includes}
+ fsm.h
+ quicksort_index.h
+ base.h
+ interleaver.h
+ calc_metric.h
+ core_algorithms.h
+ trellis_permutation.h
+ siso_type.h
+ trellis_siso_f.h
+ trellis_siso_combined_f.h
+ trellis_constellation_metrics_cf.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "trellis_devel"
+)
+
+IF(ENABLE_PYTHON)
+ INSTALL(FILES
+ ${generated_trellis_swigs}
+ fsm.i
+ interleaver.i
+ trellis_permutation.i
+ trellis_siso_f.i
+ trellis_siso_combined_f.i
+ trellis_constellation_metrics_cf.i
+ ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "trellis_swig"
+ )
+
+########################################################################
+# Setup swig generation
+########################################################################
+INCLUDE(GrPython)
+INCLUDE(GrSwig)
+
+SET(GR_SWIG_INCLUDE_DIRS
+ ${GR_TRELLIS_INCLUDE_DIRS}
+ ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
+ ${GR_DIGITAL_SWIG_INCLUDE_DIRS}
+)
+
+SET(GR_SWIG_LIBRARIES gnuradio-trellis)
+
+SET(GR_SWIG_TARGET_DEPS trellis_generated)
+
+GR_SWIG_MAKE(trellis trellis.i)
+
+GR_SWIG_INSTALL(
+ TARGETS trellis
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio
+ COMPONENT "trellis_python"
+)
+
+INSTALL(
+ FILES trellis.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "trellis_swig"
+)
+
+ENDIF(ENABLE_PYTHON)
diff --git a/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc b/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc
index 1d03886f1..ec4859ba0 100644
--- a/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc
+++ b/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc
@@ -22,7 +22,7 @@
// WARNING: this file is machine generated. Edits will be over written
-#ifndef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/gr-trellis/src/python/CMakeLists.txt b/gr-trellis/src/python/CMakeLists.txt
new file mode 100644
index 000000000..ca2ca4b39
--- /dev/null
+++ b/gr-trellis/src/python/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.
+
+########################################################################
+# 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-trellis/src/lib
+ )
+ 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-uhd/CMakeLists.txt b/gr-uhd/CMakeLists.txt
new file mode 100644
index 000000000..8a5f4e816
--- /dev/null
+++ b/gr-uhd/CMakeLists.txt
@@ -0,0 +1,106 @@
+# 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)
+
+FIND_PACKAGE(UHD)
+
+########################################################################
+# Register component
+########################################################################
+INCLUDE(GrComponent)
+GR_REGISTER_COMPONENT("gr-uhd" ENABLE_GR_UHD
+ Boost_FOUND
+ UHD_FOUND
+ ENABLE_GR_CORE_
+)
+
+GR_SET_GLOBAL(GR_UHD_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+ ${UHD_INCLUDE_DIRS}
+)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_GR_UHD)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_SET(CPACK_COMPONENT_GROUP_UHD_DESCRIPTION "The GNU Radio UHD Blocks")
+
+CPACK_COMPONENT("uhd_runtime"
+ GROUP "UHD"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Runtime"
+ DEPENDS "core_runtime"
+)
+
+CPACK_COMPONENT("uhd_devel"
+ GROUP "UHD"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+ DEPENDS "core_devel"
+)
+
+CPACK_COMPONENT("uhd_python"
+ GROUP "UHD"
+ DISPLAY_NAME "Python"
+ DESCRIPTION "Python modules for runtime; GRC xml files"
+ DEPENDS "core_python;uhd_runtime"
+)
+
+CPACK_COMPONENT("uhd_swig"
+ GROUP "UHD"
+ DISPLAY_NAME "SWIG"
+ DESCRIPTION "SWIG development .i files"
+ DEPENDS "core_swig;uhd_python;uhd_devel"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(include)
+ADD_SUBDIRECTORY(lib)
+IF(ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(swig)
+ ADD_SUBDIRECTORY(grc)
+ ADD_SUBDIRECTORY(apps)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Create Pkg Config File
+########################################################################
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-uhd.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-uhd.pc
+@ONLY)
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-uhd.pc
+ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
+ COMPONENT "uhd_devel"
+)
+
+ENDIF(ENABLE_GR_UHD)
diff --git a/gr-uhd/apps/CMakeLists.txt b/gr-uhd/apps/CMakeLists.txt
new file mode 100644
index 000000000..33e3abe15
--- /dev/null
+++ b/gr-uhd/apps/CMakeLists.txt
@@ -0,0 +1,26 @@
+# 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.
+
+INCLUDE(GrPython)
+
+GR_PYTHON_INSTALL(
+ PROGRAMS uhd_fft.py uhd_rx_cfile.py
+ DESTINATION ${GR_RUNTIME_DIR}
+ COMPONENT "uhd_python"
+)
diff --git a/gr-uhd/grc/CMakeLists.txt b/gr-uhd/grc/CMakeLists.txt
new file mode 100644
index 000000000..9e1cdb015
--- /dev/null
+++ b/gr-uhd/grc/CMakeLists.txt
@@ -0,0 +1,45 @@
+# 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.
+
+########################################################################
+# Rules for generating the source and sink xml wrappers
+########################################################################
+INCLUDE(GrPython)
+
+MACRO(GEN_BLOCK_XML _generator _xml_block)
+ SET(generator ${CMAKE_CURRENT_SOURCE_DIR}/${_generator})
+ SET(xml_block ${CMAKE_CURRENT_BINARY_DIR}/${_xml_block})
+ LIST(APPEND xml_blocks ${xml_block})
+ ADD_CUSTOM_COMMAND(
+ DEPENDS ${generator} OUTPUT ${xml_block}
+ COMMAND ${PYTHON_EXECUTABLE} ${generator} ${xml_block}
+ )
+ENDMACRO(GEN_BLOCK_XML)
+
+GEN_BLOCK_XML(gen_uhd_usrp_blocks.py uhd_usrp_source.xml)
+GEN_BLOCK_XML(gen_uhd_usrp_blocks.py uhd_usrp_sink.xml)
+
+ADD_CUSTOM_TARGET(uhd_grc_xml_blocks ALL DEPENDS ${xml_blocks})
+
+INSTALL(FILES
+ ${xml_blocks}
+ uhd_block_tree.xml
+ DESTINATION ${GRC_BLOCKS_DIR}
+ COMPONENT "uhd_python"
+)
diff --git a/gr-uhd/include/CMakeLists.txt b/gr-uhd/include/CMakeLists.txt
new file mode 100644
index 000000000..d13f85c0f
--- /dev/null
+++ b/gr-uhd/include/CMakeLists.txt
@@ -0,0 +1,29 @@
+# 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
+ gr_uhd_api.h
+ gr_uhd_usrp_source.h
+ gr_uhd_usrp_sink.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "uhd_devel"
+)
diff --git a/gr-uhd/lib/CMakeLists.txt b/gr-uhd/lib/CMakeLists.txt
new file mode 100644
index 000000000..086126eb5
--- /dev/null
+++ b/gr-uhd/lib/CMakeLists.txt
@@ -0,0 +1,57 @@
+# 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_UHD_INCLUDE_DIRS}
+)
+
+INCLUDE_DIRECTORIES(${UHD_INCLUDE_DIRS})
+LINK_DIRECTORIES(${UHD_LIBRARY_DIRS})
+
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+########################################################################
+# Setup library
+########################################################################
+LIST(APPEND gr_uhd_sources
+ gr_uhd_usrp_source.cc
+ gr_uhd_usrp_sink.cc
+)
+
+LIST(APPEND uhd_libs
+ gnuradio-core
+ ${Boost_LIBRARIES}
+ ${UHD_LIBRARIES}
+)
+
+ADD_LIBRARY(gnuradio-uhd SHARED ${gr_uhd_sources})
+TARGET_LINK_LIBRARIES(gnuradio-uhd ${uhd_libs})
+SET_TARGET_PROPERTIES(gnuradio-uhd PROPERTIES DEFINE_SYMBOL "gnuradio_uhd_EXPORTS")
+SET_TARGET_PROPERTIES(gnuradio-uhd PROPERTIES SOVERSION ${LIBVER})
+
+INSTALL(TARGETS gnuradio-uhd
+ LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "uhd_runtime" # .so/.dylib file
+ ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "uhd_devel" # .lib file
+ RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "uhd_runtime" # .dll file
+)
diff --git a/gr-uhd/swig/CMakeLists.txt b/gr-uhd/swig/CMakeLists.txt
new file mode 100644
index 000000000..47b2ff63e
--- /dev/null
+++ b/gr-uhd/swig/CMakeLists.txt
@@ -0,0 +1,53 @@
+# 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_FLAGS -DGR_HAVE_UHD) #needed to parse uhd_swig.i
+
+SET(GR_SWIG_INCLUDE_DIRS
+ ${GR_UHD_INCLUDE_DIRS}
+ ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
+)
+
+SET(GR_SWIG_LIBRARIES gnuradio-uhd)
+
+GR_SWIG_MAKE(uhd_swig uhd_swig.i)
+
+GR_SWIG_INSTALL(
+ TARGETS uhd_swig
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/uhd
+ COMPONENT "uhd_python"
+)
+
+INSTALL(
+ FILES uhd_swig.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "uhd_swig"
+)
+
+GR_PYTHON_INSTALL(
+ FILES __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/uhd
+ COMPONENT "uhd_python"
+)
diff --git a/gr-wxgui/CMakeLists.txt b/gr-wxgui/CMakeLists.txt
new file mode 100644
index 000000000..7002ce91b
--- /dev/null
+++ b/gr-wxgui/CMakeLists.txt
@@ -0,0 +1,83 @@
+# 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(GrPython)
+
+GR_PYTHON_CHECK_MODULE("wx >= 2.8" wx "wx.version().split()[0] >= '2.8'" WX_FOUND)
+GR_PYTHON_CHECK_MODULE("numpy" numpy True NUMPY_FOUND)
+
+########################################################################
+# Register component
+########################################################################
+INCLUDE(GrComponent)
+GR_REGISTER_COMPONENT("gr-wxgui" ENABLE_WXGUI
+ ENABLE_GR_CORE_
+ ENABLE_PYTHON_
+ NUMPY_FOUND
+ WX_FOUND
+)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_WXGUI)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_COMPONENT("wxgui"
+ DISPLAY_NAME "WxGUI"
+ DESCRIPTION "Wx GUI plotter widgets and grc wrappers"
+ DEPENDS "core_python"
+)
+
+########################################################################
+# Create Pkg Config File
+########################################################################
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gr-wxgui.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gr-wxgui.pc
+@ONLY)
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gr-wxgui.pc
+ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
+ COMPONENT "wxgui"
+)
+
+########################################################################
+# Install the conf file
+########################################################################
+INSTALL(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/gr-wxgui.conf
+ DESTINATION ${GR_PKG_CONF_DIR}
+ COMPONENT "wxgui"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(grc)
+ADD_SUBDIRECTORY(src/python)
+
+ENDIF(ENABLE_WXGUI)
diff --git a/gr-wxgui/grc/CMakeLists.txt b/gr-wxgui/grc/CMakeLists.txt
new file mode 100644
index 000000000..c39b5cfbe
--- /dev/null
+++ b/gr-wxgui/grc/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.
+
+########################################################################
+FILE(GLOB xml_files "*.xml")
+INSTALL(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "wxgui")
+
+########################################################################
+#The wxgui module contains a top_block + wxgui frame.
+########################################################################
+INCLUDE(GrPython)
+
+GR_PYTHON_INSTALL(
+ FILES
+ __init__.py
+ panel.py
+ top_block_gui.py
+ DESTINATION ${GR_PYTHON_DIR}/grc_gnuradio/wxgui
+ COMPONENT "wxgui"
+)
diff --git a/gr-wxgui/src/python/CMakeLists.txt b/gr-wxgui/src/python/CMakeLists.txt
new file mode 100644
index 000000000..81e3d64ca
--- /dev/null
+++ b/gr-wxgui/src/python/CMakeLists.txt
@@ -0,0 +1,88 @@
+# 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.
+
+########################################################################
+INCLUDE(GrPython)
+
+########################################################################
+# Install python files into wxgui module
+########################################################################
+GR_PYTHON_INSTALL(
+ FILES
+ __init__.py
+ common.py
+ constants.py
+ constsink_gl.py
+ const_window.py
+ form.py
+ fftsink2.py
+ fftsink_nongl.py
+ fftsink_gl.py
+ fft_window.py
+ gui.py
+ histosink_gl.py
+ histo_window.py
+ numbersink2.py
+ number_window.py
+ plot.py
+ powermate.py
+ pubsub.py
+ scopesink2.py
+ scopesink_nongl.py
+ scopesink_gl.py
+ scope_window.py
+ termsink.py
+ waterfallsink2.py
+ waterfallsink_nongl.py
+ waterfallsink_gl.py
+ waterfall_window.py
+ slider.py
+ stdgui2.py
+ DESTINATION ${GR_PYTHON_DIR}/wxgui
+ COMPONENT "wxgui"
+)
+
+########################################################################
+# Install python files into wxgui forms sub-module
+########################################################################
+GR_PYTHON_INSTALL(
+ FILES
+ forms/__init__.py
+ forms/forms.py
+ forms/converters.py
+ DESTINATION ${GR_PYTHON_DIR}/wxgui/forms
+ COMPONENT "wxgui"
+)
+
+########################################################################
+# Install python files into wxgui plotter sub-module
+########################################################################
+GR_PYTHON_INSTALL(
+ FILES
+ plotter/__init__.py
+ plotter/bar_plotter.py
+ plotter/channel_plotter.py
+ plotter/common.py
+ plotter/gltext.py
+ plotter/grid_plotter_base.py
+ plotter/plotter_base.py
+ plotter/waterfall_plotter.py
+ DESTINATION ${GR_PYTHON_DIR}/wxgui/plotter
+ COMPONENT "wxgui"
+)
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt
new file mode 100644
index 000000000..ee422a4da
--- /dev/null
+++ b/grc/CMakeLists.txt
@@ -0,0 +1,118 @@
+# 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(GrPython)
+
+GR_PYTHON_CHECK_MODULE("python >= 2.5" sys "sys.version.split()[0] >= '2.5'" PYTHON_MIN_VER_FOUND)
+GR_PYTHON_CHECK_MODULE("Cheetah >= 2.0.0" Cheetah "Cheetah.Version >= '2.0.0'" CHEETAH_FOUND)
+GR_PYTHON_CHECK_MODULE("lxml >= 1.3.6" lxml.etree "lxml.etree.LXML_VERSION >= (1, 3, 6, 0)" LXML_FOUND)
+GR_PYTHON_CHECK_MODULE("pygtk >= 2.10.0" gtk "gtk.pygtk_version >= (2, 10, 0)" PYGTK_FOUND)
+GR_PYTHON_CHECK_MODULE("numpy" numpy True NUMPY_FOUND)
+
+########################################################################
+# Register component
+########################################################################
+INCLUDE(GrComponent)
+GR_REGISTER_COMPONENT("gnuradio-companion" ENABLE_GRC
+ ENABLE_GR_CORE_
+ ENABLE_PYTHON_
+ PYTHON_MIN_VER_FOUND
+ CHEETAH_FOUND
+ LXML_FOUND
+ PYGTK_FOUND
+ NUMPY_FOUND
+)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_GRC)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_COMPONENT("grc"
+ DISPLAY_NAME "GNU Radio Companion"
+ DESCRIPTION "Graphical flow graph designer"
+ DEPENDS "core_python"
+)
+
+########################################################################
+# Create and install the grc conf file
+########################################################################
+FILE(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/${GR_PKG_DOC_DIR} docdir)
+FILE(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/${GRC_BLOCKS_DIR} blocksdir)
+
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/grc.conf.in
+ ${CMAKE_CURRENT_BINARY_DIR}/grc.conf
+@ONLY)
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/grc.conf
+ DESTINATION ${GR_PKG_CONF_DIR}
+ COMPONENT "grc"
+)
+
+GR_PYTHON_INSTALL(
+ FILES __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc
+ COMPONENT "grc"
+)
+
+########################################################################
+# Appens NSIS commands to set environment variables
+########################################################################
+FILE(TO_NATIVE_PATH ${GR_PKG_DOC_DIR} GR_DOC_DIR)
+STRING(REPLACE "\\" "\\\\" GR_DOC_DIR ${GR_DOC_DIR})
+
+FILE(TO_NATIVE_PATH ${GRC_BLOCKS_DIR} GRC_BLOCKS_PATH)
+STRING(REPLACE "\\" "\\\\" GRC_BLOCKS_PATH ${GRC_BLOCKS_PATH})
+
+FILE(TO_NATIVE_PATH ${GR_PYTHON_DIR} GR_PYTHON_POSTFIX)
+STRING(REPLACE "\\" "\\\\" GR_PYTHON_POSTFIX ${GR_PYTHON_POSTFIX})
+
+CPACK_SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
+ WriteRegStr HKLM ${HLKM_ENV} \\\"GR_DOC_DIR\\\" \\\"$INSTDIR\\\\${GR_DOC_DIR}\\\"
+ WriteRegStr HKLM ${HLKM_ENV} \\\"GRC_BLOCKS_PATH\\\" \\\"$INSTDIR\\\\${GRC_BLOCKS_PATH}\\\"
+ WriteRegStr HKLM \\\"SOFTWARE\\\\Python\\\\PythonCore\\\\2.7\\\\PythonPath\\\" \\\"gnuradio\\\" \\\"$INSTDIR\\\\${GR_PYTHON_POSTFIX}\\\"
+")
+
+CPACK_SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}
+ DeleteRegValue HKLM ${HLKM_ENV} \\\"GR_DOC_DIR\\\"
+ DeleteRegValue HKLM ${HLKM_ENV} \\\"GRC_BLOCKS_PATH\\\"
+ DeleteRegValue HKLM \\\"SOFTWARE\\\\Python\\\\PythonCore\\\\2.7\\\\PythonPath\\\" \\\"gnuradio\\\"
+")
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(base)
+ADD_SUBDIRECTORY(blocks)
+ADD_SUBDIRECTORY(freedesktop)
+ADD_SUBDIRECTORY(grc_gnuradio)
+ADD_SUBDIRECTORY(gui)
+ADD_SUBDIRECTORY(python)
+ADD_SUBDIRECTORY(scripts)
+
+ENDIF(ENABLE_GRC)
diff --git a/grc/base/CMakeLists.txt b/grc/base/CMakeLists.txt
new file mode 100644
index 000000000..81d39e69c
--- /dev/null
+++ b/grc/base/CMakeLists.txt
@@ -0,0 +1,42 @@
+# 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.
+
+########################################################################
+GR_PYTHON_INSTALL(FILES
+ odict.py
+ ParseXML.py
+ Block.py
+ Connection.py
+ Constants.py
+ Element.py
+ FlowGraph.py
+ Param.py
+ Platform.py
+ Port.py
+ __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc/base
+ COMPONENT "grc"
+)
+
+INSTALL(FILES
+ block_tree.dtd
+ flow_graph.dtd
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc/base
+ COMPONENT "grc"
+)
diff --git a/grc/blocks/CMakeLists.txt b/grc/blocks/CMakeLists.txt
new file mode 100644
index 000000000..393a91b27
--- /dev/null
+++ b/grc/blocks/CMakeLists.txt
@@ -0,0 +1,22 @@
+# 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.
+
+########################################################################
+FILE(GLOB xml_files "*.xml")
+INSTALL(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "grc")
diff --git a/grc/freedesktop/CMakeLists.txt b/grc/freedesktop/CMakeLists.txt
new file mode 100644
index 000000000..2e74dd3be
--- /dev/null
+++ b/grc/freedesktop/CMakeLists.txt
@@ -0,0 +1,47 @@
+# 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.
+
+########################################################################
+SET(grc_freedesktop_path ${GR_PKG_DATA_DIR}/grc/freedesktop)
+
+INSTALL(FILES
+ grc-icon-256.png
+ grc-icon-128.png
+ grc-icon-64.png
+ grc-icon-48.png
+ grc-icon-32.png
+ gnuradio-grc.xml
+ gnuradio-grc.desktop
+ DESTINATION ${grc_freedesktop_path}
+ COMPONENT "grc"
+)
+
+FIND_PROGRAM(HAVE_XDG_UTILS xdg-desktop-menu)
+
+IF(UNIX AND HAVE_XDG_UTILS)
+ SET(SRCDIR ${CMAKE_INSTALL_PREFIX}/${grc_freedesktop_path})
+ CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/grc_setup_freedesktop.in
+ ${CMAKE_CURRENT_BINARY_DIR}/grc_setup_freedesktop
+ @ONLY)
+ INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/grc_setup_freedesktop
+ DESTINATION ${GR_PKG_LIBEXEC_DIR} COMPONENT "grc"
+ )
+ENDIF(UNIX AND HAVE_XDG_UTILS)
diff --git a/grc/grc_gnuradio/CMakeLists.txt b/grc/grc_gnuradio/CMakeLists.txt
new file mode 100644
index 000000000..e992a60a3
--- /dev/null
+++ b/grc/grc_gnuradio/CMakeLists.txt
@@ -0,0 +1,35 @@
+# 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.
+
+########################################################################
+GR_PYTHON_INSTALL(
+ FILES __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/grc_gnuradio
+ COMPONENT "grc"
+)
+
+GR_PYTHON_INSTALL(FILES
+ blks2/__init__.py
+ blks2/error_rate.py
+ blks2/packet.py
+ blks2/selector.py
+ blks2/tcp.py
+ DESTINATION ${GR_PYTHON_DIR}/grc_gnuradio/blks2
+ COMPONENT "grc"
+)
diff --git a/grc/gui/CMakeLists.txt b/grc/gui/CMakeLists.txt
new file mode 100644
index 000000000..c2eb16e9f
--- /dev/null
+++ b/grc/gui/CMakeLists.txt
@@ -0,0 +1,48 @@
+# 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.
+
+########################################################################
+GR_PYTHON_INSTALL(FILES
+ Block.py
+ Colors.py
+ Constants.py
+ Connection.py
+ Element.py
+ FlowGraph.py
+ Param.py
+ Platform.py
+ Port.py
+ Utils.py
+ ActionHandler.py
+ Actions.py
+ Bars.py
+ BlockTreeWindow.py
+ Dialogs.py
+ DrawingArea.py
+ FileDialogs.py
+ MainWindow.py
+ Messages.py
+ NotebookPage.py
+ PropsDialog.py
+ Preferences.py
+ StateCache.py
+ __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc/gui
+ COMPONENT "grc"
+)
diff --git a/grc/python/CMakeLists.txt b/grc/python/CMakeLists.txt
new file mode 100644
index 000000000..50ec6d0ba
--- /dev/null
+++ b/grc/python/CMakeLists.txt
@@ -0,0 +1,45 @@
+# 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.
+
+########################################################################
+GR_PYTHON_INSTALL(FILES
+ convert_hier.py
+ expr_utils.py
+ extract_category.py
+ extract_docs.py
+ Block.py
+ Connection.py
+ Constants.py
+ FlowGraph.py
+ Generator.py
+ Param.py
+ Platform.py
+ Port.py
+ __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc/python
+ COMPONENT "grc"
+)
+
+INSTALL(FILES
+ block.dtd
+ default_flow_graph.grc
+ flow_graph.tmpl
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc/python
+ COMPONENT "grc"
+)
diff --git a/grc/scripts/CMakeLists.txt b/grc/scripts/CMakeLists.txt
new file mode 100644
index 000000000..b8d5330f6
--- /dev/null
+++ b/grc/scripts/CMakeLists.txt
@@ -0,0 +1,25 @@
+# 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.
+
+########################################################################
+GR_PYTHON_INSTALL(
+ PROGRAMS gnuradio-companion
+ DESTINATION ${GR_RUNTIME_DIR}
+ COMPONENT "grc"
+)
diff --git a/gruel/CMakeLists.txt b/gruel/CMakeLists.txt
new file mode 100644
index 000000000..04be4486e
--- /dev/null
+++ b/gruel/CMakeLists.txt
@@ -0,0 +1,105 @@
+# 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.
+
+########################################################################
+# Setup dependencies
+########################################################################
+INCLUDE(GrBoost)
+
+INCLUDE(GrPython) #used for code generation
+
+########################################################################
+# Register component
+########################################################################
+INCLUDE(GrComponent)
+GR_REGISTER_COMPONENT("gruel" ENABLE_GRUEL
+ Boost_FOUND
+ PYTHONINTERP_FOUND
+)
+
+INCLUDE(GrMiscUtils)
+GR_SET_GLOBAL(GRUEL_INCLUDE_DIRS
+ ${Boost_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/include
+ ${CMAKE_CURRENT_BINARY_DIR}/src/include
+)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_GRUEL)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_SET(CPACK_COMPONENT_GROUP_GRUEL_DESCRIPTION "The GNU Radio Utility Etcetera Library")
+
+CPACK_COMPONENT("gruel_runtime"
+ GROUP "Gruel"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Dynamic link libraries"
+)
+
+CPACK_COMPONENT("gruel_devel"
+ GROUP "Gruel"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+)
+
+CPACK_COMPONENT("gruel_python"
+ GROUP "Gruel"
+ DISPLAY_NAME "Python"
+ DESCRIPTION "Python modules for runtime"
+ DEPENDS "gruel_runtime"
+)
+
+CPACK_COMPONENT("gruel_swig"
+ GROUP "Gruel"
+ DISPLAY_NAME "SWIG"
+ DESCRIPTION "SWIG development .i files"
+ DEPENDS "gruel_python;gruel_devel"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(src/include/gruel)
+ADD_SUBDIRECTORY(src/scheme/gnuradio)
+ADD_SUBDIRECTORY(src/lib)
+IF(ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(src/swig)
+ ADD_SUBDIRECTORY(src/python)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Create Pkg Config File
+########################################################################
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gruel.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gruel.pc
+@ONLY)
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gruel.pc
+ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
+ COMPONENT "gruel_devel"
+)
+
+ENDIF(ENABLE_GRUEL)
diff --git a/gruel/src/include/gruel/CMakeLists.txt b/gruel/src/include/gruel/CMakeLists.txt
new file mode 100644
index 000000000..2f80043a4
--- /dev/null
+++ b/gruel/src/include/gruel/CMakeLists.txt
@@ -0,0 +1,56 @@
+# 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.
+
+########################################################################
+# Generate inet.h header file
+########################################################################
+INCLUDE(TestBigEndian)
+ENABLE_LANGUAGE(C)
+TEST_BIG_ENDIAN(GR_ARCH_BIGENDIAN)
+
+INCLUDE(CheckIncludeFileCXX)
+CHECK_INCLUDE_FILE_CXX(byteswap.h GR_HAVE_BYTESWAP)
+CHECK_INCLUDE_FILE_CXX(arpa/inet.h GR_HAVE_ARPA_INET)
+
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/inet.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/inet.h
+@ONLY)
+
+########################################################################
+# Install the headers
+########################################################################
+INSTALL(FILES
+ api.h
+ attributes.h
+ high_res_timer.h
+ ${CMAKE_CURRENT_BINARY_DIR}/inet.h
+ msg_accepter.h
+ msg_accepter_msgq.h
+ msg_queue.h
+ msg_passing.h
+ pmt.h
+ pmt_pool.h
+ pmt_sugar.h
+ realtime.h
+ sys_pri.h
+ thread_body_wrapper.h
+ thread_group.h
+ thread.h
+DESTINATION ${GR_INCLUDE_DIR}/gruel COMPONENT "gruel_devel")
diff --git a/gruel/src/include/gruel/Makefile.am b/gruel/src/include/gruel/Makefile.am
index fce739f08..d258f0379 100644
--- a/gruel/src/include/gruel/Makefile.am
+++ b/gruel/src/include/gruel/Makefile.am
@@ -26,6 +26,8 @@ EXTRA_DIST += inet.h.in
gruelincludedir = $(prefix)/include/gruel
gruelinclude_HEADERS = \
+<<<<<<< HEAD
+ $(BUILT_SOURCES) \
api.h \
attributes.h \
high_res_timer.h \
diff --git a/gruel/src/lib/CMakeLists.txt b/gruel/src/lib/CMakeLists.txt
new file mode 100644
index 000000000..d078e52f9
--- /dev/null
+++ b/gruel/src/lib/CMakeLists.txt
@@ -0,0 +1,110 @@
+# 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 subdirs rather to populate to the sources lists.
+########################################################################
+INCLUDE(GrMiscUtils)
+INCLUDE(CheckCXXSourceCompiles)
+
+GR_CHECK_HDR_N_DEF(signal.h HAVE_SIGNAL_H)
+GR_CHECK_HDR_N_DEF(sched.h HAVE_SCHED_H)
+
+SET(CMAKE_REQUIRED_LIBRARIES -lpthread)
+CHECK_CXX_SOURCE_COMPILES("
+ #include <signal.h>
+ int main(){pthread_sigmask(0, 0, 0); return 0;}
+ " HAVE_PTHREAD_SIGMASK
+)
+GR_ADD_COND_DEF(HAVE_PTHREAD_SIGMASK)
+
+SET(CMAKE_REQUIRED_LIBRARIES -lpthread)
+CHECK_CXX_SOURCE_COMPILES("
+ #include <pthread.h>
+ int main(){
+ pthread_t pthread;
+ pthread_setschedparam(pthread, 0, 0);
+ return 0;
+ } " HAVE_PTHREAD_SETSCHEDPARAM
+)
+GR_ADD_COND_DEF(HAVE_PTHREAD_SETSCHEDPARAM)
+
+CHECK_CXX_SOURCE_COMPILES("
+ #include <sched.h>
+ int main(){
+ pid_t pid;
+ sched_setscheduler(pid, 0, 0);
+ return 0;
+ } " HAVE_SCHED_SETSCHEDULER
+)
+GR_ADD_COND_DEF(HAVE_SCHED_SETSCHEDULER)
+
+########################################################################
+# Include subdirs rather to populate to the sources lists.
+########################################################################
+GR_INCLUDE_SUBDIRECTORY(msg)
+GR_INCLUDE_SUBDIRECTORY(pmt)
+
+########################################################################
+# Setup the include and linker paths
+########################################################################
+INCLUDE_DIRECTORIES(${GRUEL_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+########################################################################
+# Setup library
+########################################################################
+LIST(APPEND gruel_sources
+ realtime.cc
+ sys_pri.cc
+ thread_body_wrapper.cc
+ thread_group.cc
+)
+
+ADD_LIBRARY(gruel SHARED ${gruel_sources})
+TARGET_LINK_LIBRARIES(gruel ${Boost_LIBRARIES})
+SET_TARGET_PROPERTIES(gruel PROPERTIES DEFINE_SYMBOL "gruel_EXPORTS")
+SET_TARGET_PROPERTIES(gruel PROPERTIES SOVERSION ${LIBVER})
+
+INSTALL(TARGETS gruel
+ LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "gruel_runtime" # .so/.dylib file
+ ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "gruel_devel" # .lib file
+ RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "gruel_runtime" # .dll file
+)
+
+########################################################################
+# Setup tests
+# Set the test environment so the build libs will be found under MSVC.
+########################################################################
+IF(ENABLE_TESTING)
+
+INCLUDE_DIRECTORIES(${CPPUNIT_INCLUDE_DIRS})
+LINK_DIRECTORIES(${CPPUNIT_LIBRARY_DIRS})
+
+INCLUDE(GrTest)
+SET(GR_TEST_TARGET_DEPS gruel)
+LIST(APPEND test_gruel_sources test_gruel.cc)
+ADD_EXECUTABLE(test_gruel ${test_gruel_sources})
+TARGET_LINK_LIBRARIES(test_gruel gruel ${CPPUNIT_LIBRARIES})
+GR_ADD_TEST(gruel-test test_gruel)
+
+ENDIF(ENABLE_TESTING)
diff --git a/gruel/src/lib/Makefile.am b/gruel/src/lib/Makefile.am
index 10ec7a44d..773f3aefd 100644
--- a/gruel/src/lib/Makefile.am
+++ b/gruel/src/lib/Makefile.am
@@ -24,7 +24,7 @@ include $(top_srcdir)/Makefile.common
SUBDIRS = pmt msg
AM_CPPFLAGS = $(DEFINES) $(GRUEL_INCLUDES) $(BOOST_CPPFLAGS) \
- $(CPPUNIT_INCLUDES) $(WITH_INCLUDES) -Dgruel_EXPORTS
+ $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
TESTS = test_gruel
diff --git a/gruel/src/lib/msg/CMakeLists.txt b/gruel/src/lib/msg/CMakeLists.txt
new file mode 100644
index 000000000..877cc2909
--- /dev/null
+++ b/gruel/src/lib/msg/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Copyright 2010 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.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+
+LIST(APPEND gruel_sources
+ ${CMAKE_CURRENT_SOURCE_DIR}/msg_accepter.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/msg_accepter_msgq.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/msg_queue.cc
+)
diff --git a/gruel/src/lib/pmt/CMakeLists.txt b/gruel/src/lib/pmt/CMakeLists.txt
new file mode 100644
index 000000000..797db475a
--- /dev/null
+++ b/gruel/src/lib/pmt/CMakeLists.txt
@@ -0,0 +1,90 @@
+# Copyright 2010 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.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+
+########################################################################
+# Generate serial tags header file
+########################################################################
+GET_FILENAME_COMPONENT(SCHEME_DIR
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../scheme/gnuradio ABSOLUTE
+)
+
+GET_FILENAME_COMPONENT(PMT_SERIAL_TAGS_H
+ ${CMAKE_CURRENT_BINARY_DIR}/../../include/gruel/pmt_serial_tags.h ABSOLUTE
+)
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${PMT_SERIAL_TAGS_H}
+ DEPENDS ${SCHEME_DIR}/gen-serial-tags.py
+ DEPENDS ${SCHEME_DIR}/pmt-serial-tags.scm
+ COMMAND ${PYTHON_EXECUTABLE}
+ ${SCHEME_DIR}/gen-serial-tags.py
+ ${SCHEME_DIR}/pmt-serial-tags.scm
+ ${PMT_SERIAL_TAGS_H}
+)
+
+INSTALL(
+ FILES ${PMT_SERIAL_TAGS_H}
+ DESTINATION ${GR_INCLUDE_DIR}/gruel
+ COMPONENT "gruel_devel"
+)
+
+INCLUDE(AddFileDependencies)
+ADD_FILE_DEPENDENCIES(
+ ${CMAKE_CURRENT_SOURCE_DIR}/pmt_serialize.cc
+ ${PMT_SERIAL_TAGS_H}
+)
+
+########################################################################
+# Generate other pmt stuff
+########################################################################
+ADD_CUSTOM_COMMAND(
+ OUTPUT
+ ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv_int.h
+ ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.h
+ ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.cc
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/generate_unv.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/unv_template.h.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/unv_template.cc.t
+ ${CMAKE_CURRENT_SOURCE_DIR}/unv_qa_template.cc.t
+ COMMAND ${PYTHON_EXECUTABLE} -B -c
+ \"import os,sys\;srcdir='${CMAKE_CURRENT_SOURCE_DIR}'\;sys.path.append(srcdir)\;os.environ['srcdir']=srcdir\;from generate_unv import main\;main()\"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+LIST(APPEND gruel_sources
+ ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/pmt.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/pmt_io.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/pmt_pool.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/pmt_serialize.cc
+)
+
+LIST(APPEND test_gruel_sources
+ ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_pmt_prims.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/qa_pmt.cc
+)
diff --git a/gruel/src/python/CMakeLists.txt b/gruel/src/python/CMakeLists.txt
new file mode 100644
index 000000000..491763cd7
--- /dev/null
+++ b/gruel/src/python/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.
+
+INCLUDE(GrPython)
+
+########################################################################
+# Install python files
+########################################################################
+GR_PYTHON_INSTALL(
+ FILES __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gruel
+ COMPONENT "gruel_python"
+)
+
+GR_PYTHON_INSTALL(
+ FILES pmt/__init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gruel/pmt
+ COMPONENT "gruel_python"
+)
+
+########################################################################
+# Setup 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}/gruel/src/python
+ ${CMAKE_BINARY_DIR}/gruel/src/swig
+ )
+ SET(GR_TEST_TARGET_DEPS gruel gnuradio-core)
+ GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file})
+ENDFOREACH(py_qa_test_file)
+ENDIF(ENABLE_TESTING)
diff --git a/gruel/src/scheme/gnuradio/CMakeLists.txt b/gruel/src/scheme/gnuradio/CMakeLists.txt
new file mode 100644
index 000000000..bfa2a415f
--- /dev/null
+++ b/gruel/src/scheme/gnuradio/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Copyright 2010 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
+ pmt-serial-tags.scm
+ pmt-serialize.scm
+ macros-etc.scm
+DESTINATION ${GR_PKG_DATA_DIR} COMPONENT "gruel_swig")
diff --git a/gruel/src/swig/CMakeLists.txt b/gruel/src/swig/CMakeLists.txt
new file mode 100644
index 000000000..05f875451
--- /dev/null
+++ b/gruel/src/swig/CMakeLists.txt
@@ -0,0 +1,41 @@
+# 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 ${GRUEL_INCLUDE_DIRS})
+SET(GR_SWIG_LIBRARIES gruel)
+
+GR_SWIG_MAKE(pmt_swig pmt_swig.i)
+
+GR_SWIG_INSTALL(
+ TARGETS pmt_swig
+ DESTINATION ${GR_PYTHON_DIR}/gruel/pmt
+ COMPONENT "gruel_python"
+)
+
+INSTALL(
+ FILES gr_intrusive_ptr.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "gruel_swig"
+)