Skip to content

Commit 81ad77b

Browse files
committed
BUG: Set Python3_EXECUTABLE on Windows
The FindPython3 CMake module fails to set the Python3_EXECUTABLE variable to the discovered value on Windows -- only _Python3_EXECUTABLE is set.
1 parent c81d295 commit 81ad77b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ if(ITKPythonPackage_SUPERBUILD)
146146
OR NOT DEFINED Python3_EXECUTABLE)
147147

148148
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
149+
if(NOT Python3_EXECUTABLE AND _Python3_EXECUTABLE)
150+
set(Python3_EXECUTABLE ${_Python3_EXECUTABLE} CACHE INTERNAL
151+
"Path to the Python interpreter" FORCE)
152+
endif()
149153
endif()
150154
if(NOT DEFINED DOXYGEN_EXECUTABLE)
151155
find_package(Doxygen REQUIRED)

0 commit comments

Comments
 (0)