summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJosh Blum2011-11-08 18:33:53 -0800
committerJosh Blum2011-11-08 18:33:53 -0800
commited4023aee70008c47831c34e66fc16581ae024de (patch)
tree06d5a6eb4bb79312cdc5eeaffb6d79461178acd9 /cmake
parent0899dfc0ef4cab909271bb9d70cc03c602ca9714 (diff)
downloadgnuradio-ed4023aee70008c47831c34e66fc16581ae024de.tar.gz
gnuradio-ed4023aee70008c47831c34e66fc16581ae024de.tar.bz2
gnuradio-ed4023aee70008c47831c34e66fc16581ae024de.zip
cmake: tweaks for swig generation module
Also use deprecated python inc dirs variable to support older systems. Add current binary and source dir to include paths for dependency searcher.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/GrSwig.cmake15
1 files changed, 10 insertions, 5 deletions
diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake
index 4be583aa1..51d9203dd 100644
--- a/cmake/Modules/GrSwig.cmake
+++ b/cmake/Modules/GrSwig.cmake
@@ -38,10 +38,18 @@ include(GrPython)
macro(GR_SWIG_MAKE name)
set(ifiles ${ARGN})
+ #append additional include directories
+ find_package(PythonLibs)
+ list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH}) #deprecated name (now dirs)
+ list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS})
+ list(APPEND GR_SWIG_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
+ list(APPEND GR_SWIG_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+
#determine include dependencies for swig file
execute_process(
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/get_swig_deps.py
- "${ifiles}" "${GR_SWIG_INCLUDE_DIRS}"
+ COMMAND ${PYTHON_EXECUTABLE}
+ ${CMAKE_BINARY_DIR}/get_swig_deps.py
+ "${ifiles}" "${GR_SWIG_INCLUDE_DIRS}"
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE SWIG_MODULE_${name}_EXTRA_DEPS
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -61,9 +69,6 @@ macro(GR_SWIG_MAKE name)
include_directories(${GR_SWIG_INCLUDE_DIRS})
list(APPEND SWIG_MODULE_${name}_EXTRA_DEPS ${tag_file})
- find_package(PythonLibs)
- include_directories(${PYTHON_INCLUDE_DIRS})
-
#setup the swig flags with flags and include directories
set(CMAKE_SWIG_FLAGS -fvirtual -modern -keyword -w511 -module ${name} ${GR_SWIG_FLAGS})
foreach(dir ${GR_SWIG_INCLUDE_DIRS})