mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 22:37:30 +08:00
@@ -606,6 +606,15 @@ function (_PYTHON_GET_VERSION)
|
|||||||
if (config MATCHES "#[ ]*define[ ]+MS_WIN32")
|
if (config MATCHES "#[ ]*define[ ]+MS_WIN32")
|
||||||
# ABI not used on Windows
|
# ABI not used on Windows
|
||||||
set (abi "")
|
set (abi "")
|
||||||
|
else()
|
||||||
|
if (NOT config)
|
||||||
|
# pyconfig.h can be a wrapper to a platform specific pyconfig.h
|
||||||
|
# In this case, try to identify ABI from include directory
|
||||||
|
if (_${_PYTHON_PREFIX}_INCLUDE_DIR MATCHES "python${version_major}\.${version_minor}+([dmu]*)")
|
||||||
|
set (abi "${CMAKE_MATCH_1}")
|
||||||
|
else()
|
||||||
|
set (abi "")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
if (config MATCHES "#[ ]*define[ ]+Py_DEBUG[ ]+1")
|
if (config MATCHES "#[ ]*define[ ]+Py_DEBUG[ ]+1")
|
||||||
string (APPEND abi "d")
|
string (APPEND abi "d")
|
||||||
@@ -616,6 +625,7 @@ function (_PYTHON_GET_VERSION)
|
|||||||
if (config MATCHES "#[ ]*define[ ]+Py_UNICODE_SIZE[ ]+4")
|
if (config MATCHES "#[ ]*define[ ]+Py_UNICODE_SIZE[ ]+4")
|
||||||
string (APPEND abi "u")
|
string (APPEND abi "u")
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
set (${_PGV_PREFIX}ABI "${abi}" PARENT_SCOPE)
|
set (${_PGV_PREFIX}ABI "${abi}" PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
Reference in New Issue
Block a user