From b196ee12c098a6cc069c48bc7b9cb720fa3caf6a Mon Sep 17 00:00:00 2001 From: Dimitri Stolnikov Date: Mon, 22 Jul 2013 20:05:24 +0200 Subject: [PATCH] cmake: require Python v2 for build configuration based on a gnuradio patch by Jiri Pinkava http://gnuradio.org/cgit/gnuradio.git/commit/?id=8144572532b8bfa37af01e1264a334d2a898ea8d --- CMakeLists.txt | 2 +- cmake/Modules/GrPython.cmake | 4 ++-- cmake/Modules/GrSwig.cmake | 2 +- swig/CMakeLists.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 644cc88..14b7ffe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,7 +199,7 @@ add_custom_target(uninstall ######################################################################## # Enable python component ######################################################################## -find_package(PythonLibs) +find_package(PythonLibs 2) find_package(SWIG) if(SWIG_FOUND) diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake index 791114e..26a5c94 100644 --- a/cmake/Modules/GrPython.cmake +++ b/cmake/Modules/GrPython.cmake @@ -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) diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake index 8cf1265..f907a51 100644 --- a/cmake/Modules/GrSwig.cmake +++ b/cmake/Modules/GrSwig.cmake @@ -127,7 +127,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}) diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt index e963206..c520ff2 100644 --- a/swig/CMakeLists.txt +++ b/swig/CMakeLists.txt @@ -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()