forked from sdr/gr-osmosdr
cmake: require Python v2 for build configuration
based on a gnuradio patch by Jiri Pinkava http://gnuradio.org/cgit/gnuradio.git/commit/?id=8144572532b8bfa37af01e1264a334d2a898ea8d
This commit is contained in:
parent
2d02ae9b83
commit
6e2a2023d5
|
@ -199,7 +199,7 @@ add_custom_target(uninstall
|
|||
########################################################################
|
||||
# Enable python component
|
||||
########################################################################
|
||||
find_package(PythonLibs)
|
||||
find_package(PythonLibs 2)
|
||||
find_package(SWIG)
|
||||
|
||||
if(SWIG_FOUND)
|
||||
|
|
|
@ -36,11 +36,11 @@ if(PYTHON_EXECUTABLE)
|
|||
else(PYTHON_EXECUTABLE)
|
||||
|
||||
#use the built-in find script
|
||||
find_package(PythonInterp)
|
||||
find_package(PythonInterp 2)
|
||||
|
||||
#and if that fails use the find program routine
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
find_program(PYTHON_EXECUTABLE NAMES python python2.7 python2.6 python2.5)
|
||||
find_program(PYTHON_EXECUTABLE NAMES python python2 python2.7 python2.6 python2.5)
|
||||
if(PYTHON_EXECUTABLE)
|
||||
set(PYTHONINTERP_FOUND TRUE)
|
||||
endif(PYTHON_EXECUTABLE)
|
||||
|
|
|
@ -115,7 +115,7 @@ macro(GR_SWIG_MAKE name)
|
|||
endif()
|
||||
|
||||
#append additional include directories
|
||||
find_package(PythonLibs)
|
||||
find_package(PythonLibs 2)
|
||||
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})
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
# Include swig generation macros
|
||||
########################################################################
|
||||
find_package(SWIG)
|
||||
find_package(PythonLibs)
|
||||
find_package(PythonLibs 2)
|
||||
if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND)
|
||||
return()
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue