piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 1 | # Copyright 2011 Free Software Foundation, Inc. |
| 2 | # |
Vasil Velichkov | 1789ae2 | 2019-08-13 20:32:05 +0000 | [diff] [blame] | 3 | # This file was generated by gr_modtool, a tool from the GNU Radio framework |
| 4 | # This file is a part of gr-gsm |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 5 | # |
| 6 | # GNU Radio is free software; you can redistribute it and/or modify |
| 7 | # it under the terms of the GNU General Public License as published by |
| 8 | # the Free Software Foundation; either version 3, or (at your option) |
| 9 | # any later version. |
| 10 | # |
| 11 | # GNU Radio is distributed in the hope that it will be useful, |
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | # GNU General Public License for more details. |
| 15 | # |
| 16 | # You should have received a copy of the GNU General Public License |
| 17 | # along with GNU Radio; see the file COPYING. If not, write to |
| 18 | # the Free Software Foundation, Inc., 51 Franklin Street, |
| 19 | # Boston, MA 02110-1301, USA. |
| 20 | |
| 21 | ######################################################################## |
Vasil Velichkov | 1789ae2 | 2019-08-13 20:32:05 +0000 | [diff] [blame] | 22 | # Check if there is C++ code at all |
| 23 | ######################################################################## |
| 24 | if(NOT grgsm_sources) |
| 25 | MESSAGE(STATUS "No C++ sources... skipping swig/") |
| 26 | return() |
| 27 | endif(NOT grgsm_sources) |
| 28 | |
| 29 | ######################################################################## |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 30 | # Include swig generation macros |
| 31 | ######################################################################## |
| 32 | find_package(SWIG) |
Vasil Velichkov | 1789ae2 | 2019-08-13 20:32:05 +0000 | [diff] [blame] | 33 | find_package(PythonLibs) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 34 | if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND) |
| 35 | return() |
| 36 | endif() |
| 37 | include(GrSwig) |
| 38 | include(GrPython) |
| 39 | |
| 40 | ######################################################################## |
| 41 | # Setup swig generation |
| 42 | ######################################################################## |
Vasil Velichkov | 1789ae2 | 2019-08-13 20:32:05 +0000 | [diff] [blame] | 43 | set(GR_SWIG_INCLUDE_DIRS $<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES>) |
| 44 | set(GR_SWIG_TARGET_DEPS gnuradio::runtime_swig) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 45 | |
Piotr Krysik | 89cac10 | 2016-02-17 12:11:02 +0100 | [diff] [blame] | 46 | set(GR_SWIG_LIBRARIES grgsm) |
Vasil Velichkov | 1789ae2 | 2019-08-13 20:32:05 +0000 | [diff] [blame] | 47 | |
ptrkrysik | 3be74a7 | 2014-12-13 10:11:00 +0100 | [diff] [blame] | 48 | set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/grgsm_swig_doc.i) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 49 | set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include) |
| 50 | |
ptrkrysik | 3be74a7 | 2014-12-13 10:11:00 +0100 | [diff] [blame] | 51 | GR_SWIG_MAKE(grgsm_swig grgsm_swig.i) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 52 | |
| 53 | ######################################################################## |
| 54 | # Install the build swig module |
| 55 | ######################################################################## |
ptrkrysik | 3be74a7 | 2014-12-13 10:11:00 +0100 | [diff] [blame] | 56 | GR_SWIG_INSTALL(TARGETS grgsm_swig DESTINATION ${GR_PYTHON_DIR}/grgsm) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 57 | |
| 58 | ######################################################################## |
| 59 | # Install swig .i files for development |
| 60 | ######################################################################## |
| 61 | install( |
| 62 | FILES |
ptrkrysik | 3be74a7 | 2014-12-13 10:11:00 +0100 | [diff] [blame] | 63 | grgsm_swig.i |
| 64 | ${CMAKE_CURRENT_BINARY_DIR}/grgsm_swig_doc.i |
| 65 | DESTINATION ${GR_INCLUDE_DIR}/grgsm/swig |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 66 | ) |