57eaee2ae8
Fixed FindRuby.cmake module (from Vadim Zhukov) Fixed FindJava.cmake and FindJNI.cmake modules when cmake is used outside of our ports tree (problem reported and fix tested by pirofti@) Still "100% tests passed, 0 tests failed out of 197". No fallout in a bulk build. OK jasper@
25 lines
914 B
Plaintext
25 lines
914 B
Plaintext
$OpenBSD: patch-Modules_FindPythonInterp_cmake,v 1.4 2011/10/14 17:22:10 dcoppa Exp $
|
|
--- Modules/FindPythonInterp.cmake.orig Tue Oct 4 18:09:24 2011
|
|
+++ Modules/FindPythonInterp.cmake Fri Oct 7 09:15:16 2011
|
|
@@ -29,11 +29,17 @@
|
|
# Search for the current active python version first
|
|
find_program(PYTHON_EXECUTABLE NAMES python)
|
|
|
|
+SET(MODPY_VERSION $ENV{MODPY_VERSION})
|
|
+
|
|
# Set up the versions we know about, in the order we will search. Always add
|
|
# the user supplied additional versions to the front.
|
|
-set(_Python_VERSIONS
|
|
- ${Python_ADDITIONAL_VERSIONS}
|
|
- 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
|
|
+IF(MODPY_VERSION)
|
|
+ set(_Python_VERSIONS ${MODPY_VERSION})
|
|
+ELSE(MODPY_VERSION)
|
|
+ set(_Python_VERSIONS
|
|
+ ${Python_ADDITIONAL_VERSIONS}
|
|
+ 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
|
|
+ENDIF(MODPY_VERSION)
|
|
|
|
# Search for newest python version if python executable isn't found
|
|
if(NOT PYTHON_EXECUTABLE)
|