Detect which version of Python is used and pass it in cmake flags.