Commit 6f4a1dd9 authored by Davis King's avatar Davis King

Improved cmake's finding of the right python interpreter.

parent d3a824d9
......@@ -25,7 +25,12 @@ endif()
# Sometimes a computer will have multiple python verions installed. So in this
# block of code we find the one in the user's path and add its home folder into
# cmake's search path. That way it will use that version of python first.
find_program(PYTHON_EXECUTABLE python)
if (PYTHON3)
find_program(PYTHON_EXECUTABLE python3)
endif()
if (NOT PYTHON_EXECUTABLE)
find_program(PYTHON_EXECUTABLE python)
endif()
# Resolve symbolic links, hopefully this will give us a path in the proper
# python home directory.
get_filename_component(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} REALPATH)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment