blob: 5f1e0204426d1aea69801d26912aa87c5b483f08 [file] [log] [blame]
piotr437f5462014-02-04 17:57:25 +01001# Copyright 2011 Free Software Foundation, Inc.
2#
Vasil Velichkov1789ae22019-08-13 20:32:05 +00003# This file was generated by gr_modtool, a tool from the GNU Radio framework
4# This file is a part of gr-gsm
piotr437f5462014-02-04 17:57:25 +01005#
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 Velichkov1789ae22019-08-13 20:32:05 +000022# Check if there is C++ code at all
23########################################################################
24if(NOT grgsm_sources)
25 MESSAGE(STATUS "No C++ sources... skipping swig/")
26 return()
27endif(NOT grgsm_sources)
28
29########################################################################
piotr437f5462014-02-04 17:57:25 +010030# Include swig generation macros
31########################################################################
32find_package(SWIG)
Vasil Velichkov1789ae22019-08-13 20:32:05 +000033find_package(PythonLibs)
piotr437f5462014-02-04 17:57:25 +010034if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND)
35 return()
36endif()
37include(GrSwig)
38include(GrPython)
39
40########################################################################
41# Setup swig generation
42########################################################################
Vasil Velichkov1789ae22019-08-13 20:32:05 +000043set(GR_SWIG_INCLUDE_DIRS $<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES>)
44set(GR_SWIG_TARGET_DEPS gnuradio::runtime_swig)
piotr437f5462014-02-04 17:57:25 +010045
Piotr Krysik89cac102016-02-17 12:11:02 +010046set(GR_SWIG_LIBRARIES grgsm)
Vasil Velichkov1789ae22019-08-13 20:32:05 +000047
ptrkrysik3be74a72014-12-13 10:11:00 +010048set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/grgsm_swig_doc.i)
piotr437f5462014-02-04 17:57:25 +010049set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
50
ptrkrysik3be74a72014-12-13 10:11:00 +010051GR_SWIG_MAKE(grgsm_swig grgsm_swig.i)
piotr437f5462014-02-04 17:57:25 +010052
53########################################################################
54# Install the build swig module
55########################################################################
ptrkrysik3be74a72014-12-13 10:11:00 +010056GR_SWIG_INSTALL(TARGETS grgsm_swig DESTINATION ${GR_PYTHON_DIR}/grgsm)
piotr437f5462014-02-04 17:57:25 +010057
58########################################################################
59# Install swig .i files for development
60########################################################################
61install(
62 FILES
ptrkrysik3be74a72014-12-13 10:11:00 +010063 grgsm_swig.i
64 ${CMAKE_CURRENT_BINARY_DIR}/grgsm_swig_doc.i
65 DESTINATION ${GR_INCLUDE_DIR}/grgsm/swig
piotr437f5462014-02-04 17:57:25 +010066)