summaryrefslogtreecommitdiffstats
path: root/Modules/FindPythonLibs.cmake
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2012-03-27 20:24:43 (GMT)
committerBen Boeckel <mathstuf@gmail.com>2012-03-27 20:37:50 (GMT)
commit4bdec581b3a5a32239370e87aa2f7cadcb058aae (patch)
tree227bf224c239e95d3be923fd4354382ee9c0dc8c /Modules/FindPythonLibs.cmake
parent6a46f5ce809185e0c7dbd3d618eb4bbde808827b (diff)
downloadCMake-4bdec581b3a5a32239370e87aa2f7cadcb058aae.zip
CMake-4bdec581b3a5a32239370e87aa2f7cadcb058aae.tar.gz
CMake-4bdec581b3a5a32239370e87aa2f7cadcb058aae.tar.bz2
Search for other ABIFLAGS builds of Python
Starting with Python3, standard Python installs may have additional ABI flags attached to include directories and library names. As of 3.2, the following flags are in the configure file: d -> --with-debug m -> --with-pymalloc u -> --with-wide-unicode Python 3.3 seems to no longer have --with-wide-unicode. Hopefully Python will ensure that the possible flags always show up in a stable order. The 'd' flag is ignored since the debug library is considered separate. There is still the problem where ABI flags cannot be specified in find_package since the letters confuse the version comparator.
Diffstat (limited to 'Modules/FindPythonLibs.cmake')
-rw-r--r--Modules/FindPythonLibs.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index e833150..591b3e6 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -82,7 +82,12 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
ENDIF(WIN32)
FIND_LIBRARY(PYTHON_LIBRARY
- NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
+ NAMES
+ python${_CURRENT_VERSION_NO_DOTS}
+ python${_CURRENT_VERSION}mu
+ python${_CURRENT_VERSION}m
+ python${_CURRENT_VERSION}u
+ python${_CURRENT_VERSION}
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
@@ -120,6 +125,9 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
PATH_SUFFIXES
+ python${_CURRENT_VERSION}mu
+ python${_CURRENT_VERSION}m
+ python${_CURRENT_VERSION}u
python${_CURRENT_VERSION}
)