summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/cmake/Python.cmake11
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/cmake/Python.cmake b/indra/cmake/Python.cmake
index c8af9a528b..da5d2ef22c 100644
--- a/indra/cmake/Python.cmake
+++ b/indra/cmake/Python.cmake
@@ -40,15 +40,18 @@ elseif (WINDOWS)
${regpaths}
${pymaybe}
)
+ find_package(Python3 COMPONENTS Interpreter)
else()
find_program(python python3)
+
+ if (python)
+ set(PYTHONINTERP_FOUND ON)
+ endif (python)
endif (DEFINED ENV{PYTHON})
-if (python)
- set(PYTHONINTERP_FOUND ON)
-else()
+if (NOT python)
message(FATAL_ERROR "No Python interpreter found")
-endif (python)
+endif (NOT python)
set(PYTHON_EXECUTABLE "${python}" CACHE FILEPATH "Python interpreter for builds")
mark_as_advanced(PYTHON_EXECUTABLE)