CMake: Use more robust target-based Python detection
Previously, the code used undocumented (implemented?) PYTHON_FOUND
(instead of Python3_FOUND
). Checking for targets will be more robust anyways :)
Also there should be no need to manually set include and link directories, linking to Python3::Python
should handle all that.
Edited by Martin Heistermann