[cmake] Create FindPythonInterpreter for host information #23877
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Simplify existing FindPython and split host/target specifics
Motivation and context
This splits out host find information from the regular target find module. This allows us to not mix and check for host executable status, and only explicitly search for the host interpreter when required (eg ENABLE_EVENTCLIENTS=ON)
I will mention, this can NOT be a TARGET like everything else im heading towards for the fact that execute_process() can not use TARGETS. Its considered too low level, so a cache variable is the only way when combined with execute_process(). It could be changed to an add_custom_command, but i dont think its worthwhile for a single edge use case
@wsnipex ive been tinkering with the FindPython module, and moving the host stuff out would simplify my life greatly.
Ive got down the PLATFORM_REQUIRED_BUILDTOOLS route here (similar to req/optional dep platform variables), however i thought a little about this later, and it may just be simpler to make an explicit call
at the following
xbmc/cmake/scripts/linux/Install.cmake
Lines 206 to 209 in 0f28947
What are your thoughts?
How has this been tested?
locally macos with forcing certain paths to trigger the FindPythonInterpreter call
What is the effect on users?
N/A
Screenshots (if appropriate):
Types of change
Checklist: