2013-10-13 20:02:56 +00:00
|
|
|
# Copyright 2011 Free Software Foundation, Inc.
|
|
|
|
#
|
2019-12-01 16:49:53 +00:00
|
|
|
# This file is part of gr-fosphor
|
2013-10-13 20:02:56 +00:00
|
|
|
#
|
2019-12-01 16:49:53 +00:00
|
|
|
# gr-fosphor is free software; you can redistribute it and/or modify
|
2013-10-13 20:02:56 +00:00
|
|
|
# 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.
|
|
|
|
#
|
2019-12-01 16:49:53 +00:00
|
|
|
# gr-fosphor is distributed in the hope that it will be useful,
|
2013-10-13 20:02:56 +00:00
|
|
|
# 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
|
2019-12-01 16:49:53 +00:00
|
|
|
# along with gr-fosphor; see the file COPYING. If not, write to
|
2013-10-13 20:02:56 +00:00
|
|
|
# the Free Software Foundation, Inc., 51 Franklin Street,
|
|
|
|
# Boston, MA 02110-1301, USA.
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# Include swig generation macros
|
|
|
|
########################################################################
|
|
|
|
find_package(SWIG)
|
2019-12-01 18:45:49 +00:00
|
|
|
find_package(PythonLibs 3)
|
2013-10-13 20:02:56 +00:00
|
|
|
if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
include(GrSwig)
|
|
|
|
include(GrPython)
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# Setup swig generation
|
|
|
|
########################################################################
|
2019-12-01 18:45:49 +00:00
|
|
|
set(GR_SWIG_INCLUDE_DIRS $<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES>)
|
|
|
|
set(GR_SWIG_TARGET_DEPS gnuradio::runtime_swig)
|
2013-10-13 20:02:56 +00:00
|
|
|
|
|
|
|
set(GR_SWIG_LIBRARIES gnuradio-fosphor)
|
2019-12-01 18:45:49 +00:00
|
|
|
|
2013-10-13 20:02:56 +00:00
|
|
|
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/fosphor_swig_doc.i)
|
|
|
|
set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include/gnuradio/fosphor)
|
|
|
|
|
2013-10-26 19:09:50 +00:00
|
|
|
list_cond_append(ENABLE_GLFW GR_SWIG_FLAGS -DENABLE_GLFW)
|
|
|
|
list_cond_append(ENABLE_QT GR_SWIG_FLAGS -DENABLE_QT)
|
|
|
|
|
2013-10-13 20:02:56 +00:00
|
|
|
GR_SWIG_MAKE(fosphor_swig fosphor_swig.i)
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# Install the build swig module
|
|
|
|
########################################################################
|
|
|
|
GR_SWIG_INSTALL(TARGETS fosphor_swig DESTINATION ${GR_PYTHON_DIR}/gnuradio/fosphor)
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# Install swig .i files for development
|
|
|
|
########################################################################
|
|
|
|
install(
|
|
|
|
FILES
|
|
|
|
fosphor_swig.i
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/fosphor_swig_doc.i
|
2019-12-01 18:45:49 +00:00
|
|
|
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
|
2013-10-13 20:02:56 +00:00
|
|
|
)
|