diff --git a/CMake/FindPythonModule.cmake b/CMake/FindPythonModule.cmake index 90e247d97c..782548c981 100644 --- a/CMake/FindPythonModule.cmake +++ b/CMake/FindPythonModule.cmake @@ -21,7 +21,7 @@ function(find_python_module module) endif () endif () find_package_handle_standard_args(PY_${module} DEFAULT_MSG PY_${module_upper}) - if (NOT PY_${module}_FOUND AND ${module}_FIND_REQUIRED) + if (NOT PY_${module_upper}_FOUND AND ${module_upper}_FIND_REQUIRED) message(FATAL_ERROR "Could not find Python module ${module}!") endif () endfunction ()