diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a344bda0..1fe3fdc66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE) set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7) if (NOT ${PYBIND11_PYTHON_VERSION} STREQUAL "") find_package(PythonLibs ${PYBIND11_PYTHON_VERSION} EXACT) - if (NOT PythonLibs_FOUND) + if (NOT PYTHONLIBS_FOUND) find_package(PythonLibs ${PYBIND11_PYTHON_VERSION} REQUIRED) endif() else() diff --git a/docs/cmake.rst b/docs/cmake.rst index 02983030d..d405bc395 100644 --- a/docs/cmake.rst +++ b/docs/cmake.rst @@ -48,7 +48,7 @@ subdirectory named :file:`pybind11`. set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7) if (NOT ${EXAMPLE_PYTHON_VERSION} STREQUAL "") find_package(PythonLibs ${EXAMPLE_PYTHON_VERSION} EXACT) - if (NOT PythonLibs_FOUND) + if (NOT PYTHONLIBS_FOUND) find_package(PythonLibs ${EXAMPLE_PYTHON_VERSION} REQUIRED) endif() else()