CMakeified almost everything. Test code in python/ and apps other than uhd_modes.py still need minor updating.
This commit is contained in:
@@ -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.
|
||||
|
||||
########################################################################
|
||||
# Include swig generation macros
|
||||
########################################################################
|
||||
find_package(SWIG)
|
||||
find_package(PythonLibs)
|
||||
if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND)
|
||||
return()
|
||||
endif()
|
||||
include(GrSwig)
|
||||
include(GrPython)
|
||||
|
||||
########################################################################
|
||||
# Setup swig generation
|
||||
########################################################################
|
||||
foreach(incdir ${GNURADIO_CORE_INCLUDE_DIRS})
|
||||
list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/swig)
|
||||
endforeach(incdir)
|
||||
|
||||
set(GR_SWIG_LIBRARIES air_modes)
|
||||
#set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/gr-air-modes_swig_doc.i)
|
||||
#set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
|
||||
GR_SWIG_MAKE(air_modes_swig air_modes.i)
|
||||
|
||||
########################################################################
|
||||
# Install the build swig module
|
||||
########################################################################
|
||||
GR_SWIG_INSTALL(TARGETS air_modes_swig DESTINATION ${GR_PYTHON_DIR}/air_modes)
|
||||
|
||||
########################################################################
|
||||
# Install swig .i files for development
|
||||
########################################################################
|
||||
install(
|
||||
FILES
|
||||
air_modes.i
|
||||
#${CMAKE_CURRENT_BINARY_DIR}/air_modes_swig_doc.i
|
||||
DESTINATION $(GR_INCLUDE_DIR)/air_modes/swig
|
||||
)
|
||||
@@ -0,0 +1,41 @@
|
||||
/* -*- c++ -*- */
|
||||
|
||||
%include "gnuradio.i" // the common stuff
|
||||
|
||||
%{
|
||||
#include "air_modes_preamble.h"
|
||||
#include "air_modes_slicer.h"
|
||||
#include <gr_msg_queue.h>
|
||||
%}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* First arg is the package prefix.
|
||||
* Second arg is the name of the class minus the prefix.
|
||||
*
|
||||
* This does some behind-the-scenes magic so we can
|
||||
* access howto_square_ff from python as howto.square_ff
|
||||
*/
|
||||
GR_SWIG_BLOCK_MAGIC(air,modes_preamble);
|
||||
|
||||
air_modes_preamble_sptr air_make_modes_preamble (int channel_rate, float threshold_db);
|
||||
|
||||
class air_modes_preamble : public gr_sync_block
|
||||
{
|
||||
private:
|
||||
air_modes_preamble (int channel_rate, float threshold_db);
|
||||
};
|
||||
|
||||
GR_SWIG_BLOCK_MAGIC(air,modes_slicer);
|
||||
|
||||
air_modes_slicer_sptr air_make_modes_slicer (int channel_rate, gr_msg_queue_sptr queue);
|
||||
|
||||
class air_modes_slicer : public gr_block
|
||||
{
|
||||
private:
|
||||
air_modes_slicer (int channel_rate, gr_msg_queue_sptr queue);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user