From 0b27ecfb0a41e1b850e4edf3e343e512ade88484 Mon Sep 17 00:00:00 2001 From: Dean Moldovan Date: Thu, 29 Jun 2017 11:42:54 +0200 Subject: [PATCH] Fix compatibility of FindPythonLibsNew.cmake and FindPythonLibs.cmake Make sure `LibsNew` runs correctly if called after the old `Libs`. --- tools/FindPythonLibsNew.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/FindPythonLibsNew.cmake b/tools/FindPythonLibsNew.cmake index dc44a9df54..ad3ed48fae 100644 --- a/tools/FindPythonLibsNew.cmake +++ b/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()