[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 06/46: zeromq: converted SWIG to in-tree bu
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 06/46: zeromq: converted SWIG to in-tree build |
Date: |
Fri, 16 May 2014 19:37:13 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit b25b76e201c0eabbc89a4c8340b71bedc2e4df7c
Author: Johnathan Corgan <address@hidden>
Date: Sun Dec 8 13:13:41 2013 -0800
zeromq: converted SWIG to in-tree build
---
gr-zeromq/CMakeLists.txt | 6 ++---
gr-zeromq/swig/CMakeLists.txt | 56 ++++++++++++++++++++--------------------
gr-zeromq/swig/zeromq_swig.i | 57 +++++++++++++++++++++++++++++++++++++++++
gr-zeromq/swig/zmqblocks_swig.i | 38 ---------------------------
4 files changed, 88 insertions(+), 69 deletions(-)
diff --git a/gr-zeromq/CMakeLists.txt b/gr-zeromq/CMakeLists.txt
index f9340e0..ef46b71 100644
--- a/gr-zeromq/CMakeLists.txt
+++ b/gr-zeromq/CMakeLists.txt
@@ -87,12 +87,12 @@ CPACK_COMPONENT("zeromq_swig"
########################################################################
add_subdirectory(include/gnuradio/zeromq)
add_subdirectory(lib)
-#if(ENABLE_PYTHON)
-# add_subdirectory(swig)
+if(ENABLE_PYTHON)
+ add_subdirectory(swig)
# add_subdirectory(python/zeromq)
# add_subdirectory(grc)
# add_subdirectory(examples)
-#endif(ENABLE_PYTHON)
+endif(ENABLE_PYTHON)
#add_subdirectory(doc)
########################################################################
diff --git a/gr-zeromq/swig/CMakeLists.txt b/gr-zeromq/swig/CMakeLists.txt
index 875bd8d..529cb0d 100644
--- a/gr-zeromq/swig/CMakeLists.txt
+++ b/gr-zeromq/swig/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -18,40 +18,40 @@
# Boston, MA 02110-1301, USA.
########################################################################
-# Include swig generation macros
+# Setup swig generation
########################################################################
-find_package(SWIG)
-find_package(PythonLibs)
-if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND)
- return()
-endif()
-include(GrSwig)
include(GrPython)
+include(GrSwig)
-########################################################################
-# Setup swig generation
-########################################################################
-foreach(incdir ${GNURADIO_RUNTIME_INCLUDE_DIRS})
- list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gnuradio/swig)
-endforeach(incdir)
+set(GR_SWIG_INCLUDE_DIRS
+ ${GR_ZEROMQ_INCLUDE_DIRS}
+ ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS}
+ ${ZEROMQ_INCLUDE_DIRS}
+)
-set(GR_SWIG_LIBRARIES gnuradio-zmqblocks)
-set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/zmqblocks_swig_doc.i)
-set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
+if(ENABLE_GR_CTRLPORT)
+ list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
+ list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
+endif(ENABLE_GR_CTRLPORT)
-GR_SWIG_MAKE(zmqblocks_swig zmqblocks_swig.i)
+set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/zeromq_swig_doc.i)
+set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include/gnuradio/zeromq)
+set(GR_SWIG_DOCS_TARGET_DEPS runtime_swig_swig_doc)
+set(GR_SWIG_LIBRARIES gnuradio-zeromq)
-########################################################################
-# Install the build swig module
-########################################################################
-GR_SWIG_INSTALL(TARGETS zmqblocks_swig DESTINATION ${GR_PYTHON_DIR}/zmqblocks)
+GR_SWIG_MAKE(zeromq_swig zeromq_swig.i)
+
+GR_SWIG_INSTALL(
+ TARGETS zeromq_swig
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/zeromq
+ COMPONENT "zeromq_python"
+)
-########################################################################
-# Install swig .i files for development
-########################################################################
install(
FILES
- zmqblocks_swig.i
- ${CMAKE_CURRENT_BINARY_DIR}/zmqblocks_swig_doc.i
- DESTINATION ${GR_INCLUDE_DIR}/zmqblocks/swig
+ zeromq_swig.i
+ ${CMAKE_CURRENT_BINARY_DIR}/zeromq_swig_doc.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "zeromq_swig"
)
diff --git a/gr-zeromq/swig/zeromq_swig.i b/gr-zeromq/swig/zeromq_swig.i
new file mode 100644
index 0000000..780f9d9
--- /dev/null
+++ b/gr-zeromq/swig/zeromq_swig.i
@@ -0,0 +1,57 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013 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.
+ */
+
+#define ZEROMQ_API
+
+%include "gnuradio.i"
+
+//load generated python docstrings
+%include "zeromq_swig_doc.i"
+
+%{
+#include "gnuradio/zeromq/sink_pubsub.h"
+#include "gnuradio/zeromq/sink_pushpull.h"
+#include "gnuradio/zeromq/sink_reqrep.h"
+#include "gnuradio/zeromq/sink_reqrep_nopoll.h"
+#include "gnuradio/zeromq/source_pushpull_feedback.h"
+#include "gnuradio/zeromq/source_pushpull.h"
+#include "gnuradio/zeromq/source_reqrep.h"
+#include "gnuradio/zeromq/source_reqrep_nopoll.h"
+%}
+
+%include "gnuradio/zeromq/sink_pubsub.h"
+%include "gnuradio/zeromq/sink_pushpull.h"
+%include "gnuradio/zeromq/sink_reqrep.h"
+%include "gnuradio/zeromq/sink_reqrep_nopoll.h"
+%include "gnuradio/zeromq/source_pushpull_feedback.h"
+%include "gnuradio/zeromq/source_pushpull.h"
+%include "gnuradio/zeromq/source_reqrep.h"
+%include "gnuradio/zeromq/source_reqrep_nopoll.h"
+
+GR_SWIG_BLOCK_MAGIC2(zeromq, sink_pubsub);
+GR_SWIG_BLOCK_MAGIC2(zeromq, sink_pushpull);
+GR_SWIG_BLOCK_MAGIC2(zeromq, sink_reqrep);
+GR_SWIG_BLOCK_MAGIC2(zeromq, sink_reqrep_nopoll);
+GR_SWIG_BLOCK_MAGIC2(zeromq, source_pushpull_feedback);
+GR_SWIG_BLOCK_MAGIC2(zeromq, source_pushpull);
+GR_SWIG_BLOCK_MAGIC2(zeromq, source_reqrep);
+GR_SWIG_BLOCK_MAGIC2(zeromq, source_reqrep_nopoll);
diff --git a/gr-zeromq/swig/zmqblocks_swig.i b/gr-zeromq/swig/zmqblocks_swig.i
deleted file mode 100644
index b5ccce4..0000000
--- a/gr-zeromq/swig/zmqblocks_swig.i
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- c++ -*- */
-
-#define ZMQBLOCKS_API
-
-%include "gnuradio.i" // the common stuff
-
-//load generated python docstrings
-%include "zmqblocks_swig_doc.i"
-
-%{
-#include "zmqblocks/sink_reqrep.h"
-#include "zmqblocks/source_reqrep.h"
-#include "zmqblocks/sink_reqrep_nopoll.h"
-#include "zmqblocks/source_reqrep_nopoll.h"
-#include "zmqblocks/sink_pushpull.h"
-#include "zmqblocks/source_pushpull.h"
-#include "zmqblocks/source_pushpull_feedback.h"
-#include "zmqblocks/sink_pubsub.h"
-%}
-
-%include "zmqblocks/sink_reqrep.h"
-GR_SWIG_BLOCK_MAGIC2(zmqblocks, sink_reqrep);
-%include "zmqblocks/source_reqrep.h"
-GR_SWIG_BLOCK_MAGIC2(zmqblocks, source_reqrep);
-%include "zmqblocks/sink_reqrep_nopoll.h"
-GR_SWIG_BLOCK_MAGIC2(zmqblocks, sink_reqrep_nopoll);
-%include "zmqblocks/source_reqrep_nopoll.h"
-GR_SWIG_BLOCK_MAGIC2(zmqblocks, source_reqrep_nopoll);
-%include "zmqblocks/sink_pushpull.h"
-GR_SWIG_BLOCK_MAGIC2(zmqblocks, sink_pushpull);
-%include "zmqblocks/source_pushpull.h"
-GR_SWIG_BLOCK_MAGIC2(zmqblocks, source_pushpull);
-
-%include "zmqblocks/source_pushpull_feedback.h"
-GR_SWIG_BLOCK_MAGIC2(zmqblocks, source_pushpull_feedback);
-%include "zmqblocks/sink_pubsub.h"
-GR_SWIG_BLOCK_MAGIC2(zmqblocks, sink_pubsub);
-
- [Commit-gnuradio] [gnuradio] branch master updated (432e3b7 -> 5974a3e), git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 04/46: zeromq: first cut at compiling lib/ directory, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 17/46: wip, renaming and implementing rep_sink, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 11/46: zeromq: Rename "zmqblocks" to zeromq in examples, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 14/46: zeromq: renamed source_pushpull to pull_source, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 15/46: zeromq: renamed sink_pubsub to pub_sink, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 09/46: Fix callback function to work with multiple arguments and return None in case of error., git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 06/46: zeromq: converted SWIG to in-tree build,
git <=
- [Commit-gnuradio] [gnuradio] 18/46: Add vlen, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 16/46: zeromq: removed feedback source, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 03/46: zeromq: Initial conversion of include/gnuradio/zeromq files, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 19/46: zeromq: renamed source_reqrep to req_source, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 20/46: zeromq: remove nopoll req/rep blocks, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 21/46: zeromq: cleanup copyright, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 13/46: zeromq: renamed sink_pushpull push_sink, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 08/46: Fix ZeroMQ cmake module., git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 10/46: zeromq: Fix typo in CMakeLists to link against libzmq, git, 2014/05/16
- [Commit-gnuradio] [gnuradio] 07/46: zeromq: first try at enabling Python. Segfaults in SWIG code., git, 2014/05/16