diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-20 13:39:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-20 13:39:14 +0400 |
commit | 78ea4561a4ee8ef21c0300e13cf70957a5b48aff (patch) | |
tree | a838412fe7bdf8de91c1eab8b7defff9e8097f09 /build_files/cmake | |
parent | dbe7488c43bf5be76f7ab9be8951c3f1af96b002 (diff) |
fix for python ABI search, was missing 'd'
Diffstat (limited to 'build_files/cmake')
-rw-r--r-- | build_files/cmake/Modules/FindPythonLibsUnix.cmake | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/build_files/cmake/Modules/FindPythonLibsUnix.cmake b/build_files/cmake/Modules/FindPythonLibsUnix.cmake index ea5f8f43344..882f1e2ea77 100644 --- a/build_files/cmake/Modules/FindPythonLibsUnix.cmake +++ b/build_files/cmake/Modules/FindPythonLibsUnix.cmake @@ -34,8 +34,11 @@ IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "") SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR}) ENDIF() - -SET(PYTHON_VERSION 3.2 CACHE STRING "") +IF(DEFINED PYTHON_VERSION) + SET(PYTHON_VERSION "${PYTHON_VERSION}" CACHE STRING "") +ELSE() + SET(PYTHON_VERSION 3.2 CACHE STRING "") +ENDIF() MARK_AS_ADVANCED(PYTHON_VERSION) SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic") @@ -43,7 +46,7 @@ MARK_AS_ADVANCED(PYTHON_LINKFLAGS) SET(_python_ABI_FLAGS "m;mu;u; " # release - "md;mud;ud" # debug + "md;mud;ud;d" # debug ) STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION}) @@ -61,15 +64,21 @@ FOREACH(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS}) STRING(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS}) FIND_PATH(PYTHON_INCLUDE_DIR - NAMES Python.h - HINTS ${_python_SEARCH_DIRS} - PATH_SUFFIXES include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS} + NAMES + Python.h + HINTS + ${_python_SEARCH_DIRS} + PATH_SUFFIXES + include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS} ) FIND_LIBRARY(PYTHON_LIBRARY - NAMES "python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}" - HINTS ${_python_SEARCH_DIRS} - PATH_SUFFIXES lib64 lib + NAMES + "python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}" + HINTS + ${_python_SEARCH_DIRS} + PATH_SUFFIXES + lib64 lib ) IF(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR) |