Skip to content

Commit 2e37fe0

Browse files
committed
Fix compatibility of FindPythonLibsNew.cmake and FindPythonLibs.cmake
Make sure `LibsNew` runs correctly if called after the old `Libs`.
1 parent cb3d406 commit 2e37fe0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/FindPythonLibsNew.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5151
#=============================================================================
5252

53-
if(PYTHONLIBS_FOUND)
53+
# Checking for the extension makes sure that `LibsNew` was found and not just `Libs`.
54+
if(PYTHONLIBS_FOUND AND PYTHON_MODULE_EXTENSION)
5455
return()
5556
endif()
5657

0 commit comments

Comments
 (0)