From 7a9166f9058389835d14e03f30975883ed99a054 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Fri, 26 Jul 2013 21:08:56 +0200 Subject: [PATCH] build: Force cmake to find PythonInterp and PythonLibs v2.x Signed-off-by: Sylvain Munaut --- cmake/Modules/GrPython.cmake | 2 +- cmake/Modules/GrSwig.cmake | 2 +- swig/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake index efdddf3..f2d7d64 100644 --- a/cmake/Modules/GrPython.cmake +++ b/cmake/Modules/GrPython.cmake @@ -36,7 +36,7 @@ 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) diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake index 6ba5ee3..569667b 100644 --- a/cmake/Modules/GrSwig.cmake +++ b/cmake/Modules/GrSwig.cmake @@ -114,7 +114,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}) diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt index 0a439bc..bf85355 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()