summaryrefslogtreecommitdiff
path: root/ext/pybind11/tools/FindPythonLibsNew.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pybind11/tools/FindPythonLibsNew.cmake')
-rw-r--r--ext/pybind11/tools/FindPythonLibsNew.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pybind11/tools/FindPythonLibsNew.cmake b/ext/pybind11/tools/FindPythonLibsNew.cmake
index dc44a9df5..ad3ed48fa 100644
--- a/ext/pybind11/tools/FindPythonLibsNew.cmake
+++ b/ext/pybind11/tools/FindPythonLibsNew.cmake
@@ -50,7 +50,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
-if(PYTHONLIBS_FOUND)
+# Checking for the extension makes sure that `LibsNew` was found and not just `Libs`.
+if(PYTHONLIBS_FOUND AND PYTHON_MODULE_EXTENSION)
return()
endif()