DRTVWR-587: Simplify Python.cmake by omitting find_package(Python3).
Elsewhere in CMake land, we reference PYTHONINTERP_FOUND and PYTHON_EXECUTABLE, both of which are explicitly set by Python.cmake. We don't seem to need the find_package(Python3 COMPONENTS Interpreter) call. Given that we take some pains to be careful about which Windows Python interpreter we find, this eliminates a wildcard.master
parent
25388312cf
commit
7efe86cdde
|
|
@ -40,18 +40,15 @@ 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 (NOT python)
|
||||
if (python)
|
||||
set(PYTHONINTERP_FOUND ON)
|
||||
else()
|
||||
message(FATAL_ERROR "No Python interpreter found")
|
||||
endif (NOT python)
|
||||
endif (python)
|
||||
|
||||
set(PYTHON_EXECUTABLE "${python}" CACHE FILEPATH "Python interpreter for builds")
|
||||
mark_as_advanced(PYTHON_EXECUTABLE)
|
||||
|
|
|
|||
Loading…
Reference in New Issue