Explorar o código

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.
Ben Boeckel %!s(int64=5) %!d(string=hai) anos
pai
achega
894fdea2a9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Modules/FindPython/Support.cmake

+ 1 - 1
Modules/FindPython/Support.cmake

@@ -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()