Fix compatibility of FindPythonLibsNew.cmake and FindPythonLibs.cmake

Make sure `LibsNew` runs correctly if called after the old `Libs`.
This commit is contained in:
Dean Moldovan 2017-06-29 11:42:54 +02:00
parent cb3d4065fe
commit 2e37fe09e1
1 changed files with 2 additions and 1 deletions

View File

@ -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()