8b1b17cff8
"This is good, commit." espie@
49 lines
1.7 KiB
Plaintext
49 lines
1.7 KiB
Plaintext
$OpenBSD: patch-Modules_FindPythonLibs_cmake,v 1.1 2010/05/28 20:21:48 dcoppa Exp $
|
|
--- Modules/FindPythonLibs.cmake.orig Tue Apr 6 16:45:31 2010
|
|
+++ Modules/FindPythonLibs.cmake Tue May 11 14:26:12 2010
|
|
@@ -27,7 +27,16 @@ INCLUDE(CMakeFindFrameworks)
|
|
# Search for the python framework on Apple.
|
|
CMAKE_FIND_FRAMEWORKS(Python)
|
|
|
|
-FOREACH(_CURRENT_VERSION 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
|
|
+SET(MODPY_VERSION $ENV{MODPY_VERSION})
|
|
+SET(MODPY_INCDIR $ENV{MODPY_INCDIR})
|
|
+
|
|
+IF(MODPY_VERSION)
|
|
+ SET(_VERSIONS ${MODPY_VERSION})
|
|
+ELSE(MODPY_VERSION)
|
|
+ SET(_VERSIONS 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
|
|
+ENDIF(MODPY_VERSION)
|
|
+
|
|
+FOREACH(_CURRENT_VERSION ${_VERSIONS})
|
|
STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
|
|
IF(WIN32)
|
|
FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
|
|
@@ -68,14 +77,18 @@ FOREACH(_CURRENT_VERSION 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1
|
|
ENDFOREACH(dir)
|
|
ENDIF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
|
|
|
|
- FIND_PATH(PYTHON_INCLUDE_DIR
|
|
- NAMES Python.h
|
|
- PATHS
|
|
- ${PYTHON_FRAMEWORK_INCLUDES}
|
|
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
|
|
- PATH_SUFFIXES
|
|
- python${_CURRENT_VERSION}
|
|
- )
|
|
+ IF(MODPY_VERSION AND MODPY_INCDIR)
|
|
+ SET(PYTHON_INCLUDE_DIR "${MODPY_INCDIR}")
|
|
+ ELSE(MODPY_VERSION AND MODPY_INCDIR)
|
|
+ FIND_PATH(PYTHON_INCLUDE_DIR
|
|
+ NAMES Python.h
|
|
+ PATHS
|
|
+ ${PYTHON_FRAMEWORK_INCLUDES}
|
|
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
|
|
+ PATH_SUFFIXES
|
|
+ python${_CURRENT_VERSION}
|
|
+ )
|
|
+ ENDIF(MODPY_VERSION AND MODPY_INCDIR)
|
|
|
|
# For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
|
|
SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
|