FindPython: remove extra dereference

If the version is not found (e.g., missing headers), this causes a CMake
error about `if(blah VERSION_EQUAL)` being an invalid statement.
This commit is contained in:
Ben Boeckel 2020-04-14 08:11:44 -04:00 committed by Brad King
parent 0b9c9e2c8c
commit 894fdea2a9

View File

@ -2224,7 +2224,7 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS
_python_get_version (INCLUDE PREFIX _${_PYTHON_PREFIX}_INC_)
# update versioning
if (_${_PYTHON_PREFIX}_INC_VERSION VERSION_EQUAL ${_${_PYTHON_PREFIX}_VERSION})
if (_${_PYTHON_PREFIX}_INC_VERSION VERSION_EQUAL _${_PYTHON_PREFIX}_VERSION)
set (_${_PYTHON_PREFIX}_VERSION_PATCH ${_${_PYTHON_PREFIX}_INC_VERSION_PATCH})
endif()
endif()