diff options
author | Peter Wu <peter@lekensteyn.nl> | 2019-01-09 19:34:57 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2019-01-10 06:42:08 +0000 |
commit | 3cc0cfc48cb1c66612b69d9c6b07126412d2a069 (patch) | |
tree | 5e9e949286df4958159df870176e05f3876f3d9f /cmake | |
parent | 1243976ccdf5d76812d6dd05eaf5a1769a454d9b (diff) |
CMake: try harder to find the right Python version
The FindPythonInterp module does not verify that a discovered 'python'
program is actually Python 3. Replace this deprecated module by a modern
version that was introduced with CMake 3.12.
Remove PYTHON_EXECUTABLE from WSDG now that it is much more likely that
CMake discovers the right version.
Change-Id: I1f8438baced3d5bf9e1e2732980ad177d3257ca3
Reviewed-on: https://code.wireshark.org/review/31468
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/LocatePythonModule.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/modules/LocatePythonModule.cmake b/cmake/modules/LocatePythonModule.cmake index efc6c3ff2e..3fbe0c793d 100644 --- a/cmake/modules/LocatePythonModule.cmake +++ b/cmake/modules/LocatePythonModule.cmake @@ -6,7 +6,9 @@ # After PATHS additional paths for python to search can be provided. # When REQUIRED is set, the function will abort the cmake execution is the module is not found function(LOCATE_PYTHON_MODULE module) - find_package(PythonInterp) + if(NOT PYTHON_EXECUTABLE) + find_package(PythonInterp) + endif() # Parse (additional) arguments set(options REQUIRED) |