diff --git a/cmake/PythonSupport.cmake b/cmake/PythonSupport.cmake index 37f32c2..9f06829 100644 --- a/cmake/PythonSupport.cmake +++ b/cmake/PythonSupport.cmake @@ -15,7 +15,7 @@ # is Windows. Here, we need it while building, regardless of target, # on a Windows host. if (CMAKE_HOST_SYSTEM MATCHES "Windows") - set (PYTHON_PATH_SEPARATOR ";") + set (PYTHON_PATH_SEPARATOR "\\\;") else() set (PYTHON_PATH_SEPARATOR ":") endif() @@ -46,21 +46,21 @@ endfunction() macro (FindPythonInterpreter) if (NOT PYTHON_FOUND) message (STATUS "Looking for Python") - endif() - if ( CMAKE_VERSION VERSION_GREATER 3.12 ) - find_package (Python) - if (NOT Python_Interpreter_FOUND ) - message (FATAL_ERROR "No Python interpreter found") - else() - set (PYTHON_EXECUTABLE ${Python_EXECUTABLE}) - endif() - set (PYTHON_FOUND ${Python_Interpreter_FOUND}) - else() - # set( Python_ADDITIONAL_VERSIONS "3" "3.5" "3.6" "3.7" ) - find_package (PythonInterp) - if (NOT PYTHONINTERP_FOUND) - message (FATAL_ERROR "No Python interpreter found.") - endif() - set (PYTHON_FOUND ${PYTHONINTERP_FOUND}) + if ( CMAKE_VERSION VERSION_GREATER 3.12 ) + find_package (Python) + if (NOT Python_Interpreter_FOUND ) + message (FATAL_ERROR "No Python interpreter found") + else() + set (PYTHON_EXECUTABLE ${Python_EXECUTABLE}) + endif() + set (PYTHON_FOUND ${Python_Interpreter_FOUND}) + else() + # set( Python_ADDITIONAL_VERSIONS "3" "3.5" "3.6" "3.7" ) + find_package (PythonInterp) + if (NOT PYTHONINTERP_FOUND) + message (FATAL_ERROR "No Python interpreter found.") + endif() + set (PYTHON_FOUND ${PYTHONINTERP_FOUND}) + endif() endif() endmacro()