aboutsummaryrefslogtreecommitdiffstats
path: root/swig/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'swig/CMakeLists.txt')
-rw-r--r--swig/CMakeLists.txt27
1 files changed, 14 insertions, 13 deletions
diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt
index 4766220..5f1e020 100644
--- a/swig/CMakeLists.txt
+++ b/swig/CMakeLists.txt
@@ -1,6 +1,7 @@
# Copyright 2011 Free Software Foundation, Inc.
#
-# This file is part of GNU Radio
+# This file was generated by gr_modtool, a tool from the GNU Radio framework
+# This file is a part of gr-gsm
#
# 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
@@ -18,31 +19,32 @@
# Boston, MA 02110-1301, USA.
########################################################################
+# Check if there is C++ code at all
+########################################################################
+if(NOT grgsm_sources)
+ MESSAGE(STATUS "No C++ sources... skipping swig/")
+ return()
+endif(NOT grgsm_sources)
+
+########################################################################
# Include swig generation macros
########################################################################
find_package(SWIG)
-find_package(PythonLibs 2)
+find_package(PythonLibs)
if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND)
return()
endif()
include(GrSwig)
include(GrPython)
-IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- # Mac OS X specific code
- # Without this flag it does not find some of the libraries
- SET(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup")
-ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-
########################################################################
# Setup swig generation
########################################################################
-foreach(incdir ${GNURADIO_RUNTIME_INCLUDE_DIRS})
- list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gnuradio/swig)
-endforeach(incdir)
-list(APPEND GR_SWIG_INCLUDE_DIRS ${FFTW3F_INCLUDE_DIRS})
+set(GR_SWIG_INCLUDE_DIRS $<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES>)
+set(GR_SWIG_TARGET_DEPS gnuradio::runtime_swig)
set(GR_SWIG_LIBRARIES grgsm)
+
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/grgsm_swig_doc.i)
set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
@@ -59,7 +61,6 @@ GR_SWIG_INSTALL(TARGETS grgsm_swig DESTINATION ${GR_PYTHON_DIR}/grgsm)
install(
FILES
grgsm_swig.i
- constants.i
${CMAKE_CURRENT_BINARY_DIR}/grgsm_swig_doc.i
DESTINATION ${GR_INCLUDE_DIR}/grgsm/swig
)