Commit 69b35f98 authored by Ryan Pavlik's avatar Ryan Pavlik
Browse files

build: Actually search for Python 3 interpreter before using it.

parent 0ea7cf80
......@@ -43,6 +43,17 @@ find_package(cJSON)
find_package(Systemd)
find_package(OpenGLES COMPONENTS V3)
if(NOT CMAKE_VERSION VERSION_LESS 3.12)
find_package(Python3 REQUIRED Interpreter)
set(PYTHON_EXECUTABLE Python3::Interpreter)
else()
find_package(PythonInterp REQUIRED VERSION 3)
if(PYTHON_EXECUTABLE MATCHES "WindowsApps")
# If you hit this error, you will have to install Python 3 or try harder to tell CMake where it is.
message(FATAL_ERROR "Found WindowsApps alias for Python. Make sure Python3 is installed, then choose 'Manage App Execution Aliases' in Start and disable the aliases for Python.")
endif()
endif()
add_library(xrt-pthreads INTERFACE)
if(WIN32)
find_package(pthreads_windows REQUIRED)
......
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