Fix python detection when cross-compiling

This commit is contained in:
Carles Fernandez 2020-10-16 19:46:44 +02:00
parent beddfb6f73
commit 76f0eb7acd
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ endmacro()
# or finds the interpreter via the built-in cmake module.
########################################################################
if(CMAKE_VERSION VERSION_LESS 3.12)
if(CMAKE_VERSION VERSION_LESS 3.12 OR CMAKE_CROSSCOMPILING)
if(PYTHON_EXECUTABLE)
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
string(FIND "${PYTHON_EXECUTABLE}" "python3" IS_PYTHON3)