Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions cmake/PythonSupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()