CMake: Use FindPython3 for TCastTo generation

This commit is contained in:
Luke Street 2022-05-19 00:57:53 -07:00
parent 26fd0e2b9f
commit 9c5dda1c7d
1 changed files with 2 additions and 1 deletions

View File

@ -28,8 +28,9 @@ else ()
list(APPEND PLAT_SRCS CMemoryCardSysNix.cpp)
endif ()
find_package(Python3 COMPONENTS Interpreter REQUIRED)
add_custom_command(OUTPUT TCastTo.hpp TCastTo.cpp DEPENDS MkCastTo.py
COMMAND python ARGS ${CMAKE_CURRENT_SOURCE_DIR}/MkCastTo.py
COMMAND ${Python3_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/MkCastTo.py
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating cast functions")