diff options
-rw-r--r-- | gr-howto-write-a-block-cmake/CMakeLists.txt | 3 | ||||
-rw-r--r-- | gr-howto-write-a-block-cmake/include/CMakeLists.txt | 28 | ||||
-rw-r--r-- | gr-howto-write-a-block-cmake/include/howto_api.h (renamed from gr-howto-write-a-block-cmake/lib/howto_api.h) | 0 | ||||
-rw-r--r-- | gr-howto-write-a-block-cmake/include/howto_square2_ff.h (renamed from gr-howto-write-a-block-cmake/lib/howto_square2_ff.h) | 0 | ||||
-rw-r--r-- | gr-howto-write-a-block-cmake/include/howto_square_ff.h (renamed from gr-howto-write-a-block-cmake/lib/howto_square_ff.h) | 0 | ||||
-rw-r--r-- | gr-howto-write-a-block-cmake/lib/CMakeLists.txt | 10 | ||||
-rw-r--r-- | gr-howto-write-a-block-cmake/swig/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-howto-write-a-block-cmake/swig/howto_square2_ff.i | 9 | ||||
-rw-r--r-- | gr-howto-write-a-block-cmake/swig/howto_square_ff.i | 16 | ||||
-rw-r--r-- | gr-howto-write-a-block-cmake/swig/howto_swig.i | 9 |
10 files changed, 37 insertions, 40 deletions
diff --git a/gr-howto-write-a-block-cmake/CMakeLists.txt b/gr-howto-write-a-block-cmake/CMakeLists.txt index b6d9f7bb5..06f3bb72c 100644 --- a/gr-howto-write-a-block-cmake/CMakeLists.txt +++ b/gr-howto-write-a-block-cmake/CMakeLists.txt @@ -81,7 +81,7 @@ endif() # Setup the include and linker paths ######################################################################## include_directories( - ${CMAKE_SOURCE_DIR}/lib + ${CMAKE_SOURCE_DIR}/include ${Boost_INCLUDE_DIRS} ${GRUEL_INCLUDE_DIRS} ${GNURADIO_CORE_INCLUDE_DIRS} @@ -96,6 +96,7 @@ link_directories( ######################################################################## # Add subdirectories ######################################################################## +add_subdirectory(include) add_subdirectory(lib) add_subdirectory(swig) add_subdirectory(python) diff --git a/gr-howto-write-a-block-cmake/include/CMakeLists.txt b/gr-howto-write-a-block-cmake/include/CMakeLists.txt new file mode 100644 index 000000000..475cc73c6 --- /dev/null +++ b/gr-howto-write-a-block-cmake/include/CMakeLists.txt @@ -0,0 +1,28 @@ +# 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 public header files +######################################################################## +install(FILES + howto_api.h + howto_square_ff.h + howto_square2_ff.h + DESTINATION include/howto +) diff --git a/gr-howto-write-a-block-cmake/lib/howto_api.h b/gr-howto-write-a-block-cmake/include/howto_api.h index 5263a1cf7..5263a1cf7 100644 --- a/gr-howto-write-a-block-cmake/lib/howto_api.h +++ b/gr-howto-write-a-block-cmake/include/howto_api.h diff --git a/gr-howto-write-a-block-cmake/lib/howto_square2_ff.h b/gr-howto-write-a-block-cmake/include/howto_square2_ff.h index c45a1851f..c45a1851f 100644 --- a/gr-howto-write-a-block-cmake/lib/howto_square2_ff.h +++ b/gr-howto-write-a-block-cmake/include/howto_square2_ff.h diff --git a/gr-howto-write-a-block-cmake/lib/howto_square_ff.h b/gr-howto-write-a-block-cmake/include/howto_square_ff.h index f07a1d4f6..f07a1d4f6 100644 --- a/gr-howto-write-a-block-cmake/lib/howto_square_ff.h +++ b/gr-howto-write-a-block-cmake/include/howto_square_ff.h diff --git a/gr-howto-write-a-block-cmake/lib/CMakeLists.txt b/gr-howto-write-a-block-cmake/lib/CMakeLists.txt index 21eb280da..835ae02d6 100644 --- a/gr-howto-write-a-block-cmake/lib/CMakeLists.txt +++ b/gr-howto-write-a-block-cmake/lib/CMakeLists.txt @@ -36,16 +36,6 @@ install(TARGETS gnuradio-howto ) ######################################################################## -# Install public header files -######################################################################## -install(FILES - howto_api.h - howto_square_ff.h - howto_square2_ff.h - DESTINATION include/howto -) - -######################################################################## # Build and register unit test ######################################################################## find_package(Boost COMPONENTS unit_test_framework) diff --git a/gr-howto-write-a-block-cmake/swig/CMakeLists.txt b/gr-howto-write-a-block-cmake/swig/CMakeLists.txt index cd3253666..676cc76ca 100644 --- a/gr-howto-write-a-block-cmake/swig/CMakeLists.txt +++ b/gr-howto-write-a-block-cmake/swig/CMakeLists.txt @@ -50,7 +50,5 @@ GR_SWIG_INSTALL(TARGETS howto_swig DESTINATION ${GR_PYTHON_DIR}/howto) install( FILES howto_swig.i - howto_square_ff.i - howto_square2_ff.i DESTINATION include/howto/swig ) diff --git a/gr-howto-write-a-block-cmake/swig/howto_square2_ff.i b/gr-howto-write-a-block-cmake/swig/howto_square2_ff.i deleted file mode 100644 index 683a93d61..000000000 --- a/gr-howto-write-a-block-cmake/swig/howto_square2_ff.i +++ /dev/null @@ -1,9 +0,0 @@ -GR_SWIG_BLOCK_MAGIC(howto,square2_ff); - -howto_square2_ff_sptr howto_make_square2_ff (); - -class howto_square2_ff : public gr_sync_block -{ -private: - howto_square2_ff (); -}; diff --git a/gr-howto-write-a-block-cmake/swig/howto_square_ff.i b/gr-howto-write-a-block-cmake/swig/howto_square_ff.i deleted file mode 100644 index f8ae76986..000000000 --- a/gr-howto-write-a-block-cmake/swig/howto_square_ff.i +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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(howto,square_ff); - -howto_square_ff_sptr howto_make_square_ff (); - -class howto_square_ff : public gr_block -{ -private: - howto_square_ff (); -}; diff --git a/gr-howto-write-a-block-cmake/swig/howto_swig.i b/gr-howto-write-a-block-cmake/swig/howto_swig.i index d0bbcdc11..52100057c 100644 --- a/gr-howto-write-a-block-cmake/swig/howto_swig.i +++ b/gr-howto-write-a-block-cmake/swig/howto_swig.i @@ -1,5 +1,7 @@ /* -*- c++ -*- */ +#define HOWTO_API + %include "gnuradio.i" // the common stuff %{ @@ -7,8 +9,11 @@ #include "howto_square2_ff.h" %} -%include "howto_square_ff.i" -%include "howto_square2_ff.i" +GR_SWIG_BLOCK_MAGIC(howto,square_ff); +%include "howto_square_ff.h" + +GR_SWIG_BLOCK_MAGIC(howto,square2_ff); +%include "howto_square2_ff.h" #if SWIGGUILE %scheme %{ |