Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake hacks for windows #68

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
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()