forked from osmocom/wireshark
CMake: remove LocatePythonExecutable.cmake for Windows
Cygwin is now unsupported, so remove special handling for it and rely on FindPythonInterp.cmake to locate an appropriate version. This patch can only cause issues if the PATH environment variable contains the Cygwin binary directory without any native Python version appearing before that. In that case, either remove Cygwin from PATH or add the native Python (e.g. C:\Python37) earlier in PATH. Change-Id: Ia5554e5a83d06a941dacf4a28d41d84fca4fe99d Reviewed-on: https://code.wireshark.org/review/31453 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
aac30ba2d1
commit
fd4d41fc32
|
@ -110,9 +110,6 @@ if(WIN32)
|
|||
|
||||
# XXX Add a dependency on ${_ws_lib_dir}/current_tag.txt?
|
||||
|
||||
# Head off any attempts to use Cygwin's Python.
|
||||
include(LocatePythonExecutable)
|
||||
|
||||
# Prepopulate some ConfigureChecks values. Compilation checks
|
||||
# on Windows can be slow.
|
||||
set(HAVE_FCNTL_H TRUE)
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
# Try to find Python and set PYTHON_EXECUTABLE on Windows prior to
|
||||
# calling FindPythonInterp in order to keep us from using Cygwin's Python.
|
||||
# http://public.kitware.com/Bug/view.php?id=13818
|
||||
|
||||
if(NOT PYTHON_EXECUTABLE AND WIN32)
|
||||
foreach(_major_version 3)
|
||||
foreach(_minor_version 7 6 5 4 3 2 1)
|
||||
if (PYTHON_EXECUTABLE)
|
||||
break()
|
||||
endif()
|
||||
find_program(PYTHON_EXECUTABLE
|
||||
python3.exe
|
||||
python.exe
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_major_version}.${_minor_version}\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_major_version}.${_minor_version}-32\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_major_version}.${_minor_version}-64\\InstallPath]
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
endforeach()
|
||||
endforeach()
|
||||
endif()
|
Loading…
Reference in New Issue