Skip to content

Commit

Permalink
Switch calls to find_package(PythonInterp) and find_package(PythonLib…
Browse files Browse the repository at this point in the history
…s) to avoid linking with wrong python

The cmake documentation
(https://cmake.org/cmake/help/v3.5/module/FindPythonLibs.html) says
that:
"If calling both find_package(PythonInterp) and
find_package(PythonLibs), call find_package(PythonInterp) first to get
the currently active Python version by default with a consistent version
of PYTHON_LIBRARIES."
  • Loading branch information
Edison Gustavo Muenz committed Dec 13, 2016
1 parent 148a0a6 commit 68b0a12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -64,8 +64,8 @@ if ( CGAL_FOUND )
message(STATUS "BUILD_RUBY is set to OFF: no CGAL-bindings for Ruby will be generated.")
endif()
if (${BUILD_PYTHON})
FIND_PACKAGE(PythonLibs)
find_package(PythonInterp)
FIND_PACKAGE(PythonLibs)
if (NOT PYTHONLIBS_FOUND)
SET(BUILD_PYTHON OFF)
message(WARNING "Python has not been found, CGAL-bindings for Python will not be generated.")
Expand Down

0 comments on commit 68b0a12

Please sign in to comment.