@@ -61,46 +61,22 @@ if(PYTHON_LIBRARIES AND PYTHON_INCLUDE_DIRS AND PYTHON_EXECUTABLE AND SWIG_EXECU
61
61
else ()
62
62
find_package (SWIG 2.0 )
63
63
if (SWIG_FOUND )
64
- if (NOT CMAKE_VERSION VERSION_LESS 3.12 )
65
- if (LLDB_PYTHON_VERSION )
66
- if (LLDB_PYTHON_VERSION VERSION_EQUAL "2" )
67
- FindPython2 ()
68
- elseif (LLDB_PYTHON_VERSION VERSION_EQUAL "3" )
69
- FindPython3 ()
70
- endif ()
71
- else ()
64
+ if (LLDB_PYTHON_VERSION )
65
+ if (LLDB_PYTHON_VERSION VERSION_EQUAL "2" )
66
+ FindPython2 ()
67
+ elseif (LLDB_PYTHON_VERSION VERSION_EQUAL "3" )
72
68
FindPython3 ()
73
- if (NOT PYTHON3_FOUND AND NOT CMAKE_SYSTEM_NAME STREQUAL Windows )
74
- FindPython2 ()
75
- endif ()
76
69
endif ()
77
70
else ()
78
- find_package (PythonInterp )
79
- find_package (PythonLibs )
80
- if (PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND AND SWIG_FOUND )
81
- if (NOT CMAKE_CROSSCOMPILING )
82
- string (REPLACE "." ";" pythonlibs_version_list ${PYTHONLIBS_VERSION_STRING} )
83
- list (GET pythonlibs_version_list 0 pythonlibs_major )
84
- list (GET pythonlibs_version_list 1 pythonlibs_minor )
85
-
86
- # Ignore the patch version. Some versions of macOS report a different
87
- # patch version for the system provided interpreter and libraries.
88
- if (CMAKE_CROSSCOMPILING OR (PYTHON_VERSION_MAJOR VERSION_EQUAL pythonlibs_major AND
89
- PYTHON_VERSION_MINOR VERSION_EQUAL pythonlibs_minor ))
90
- mark_as_advanced (
91
- PYTHON_LIBRARIES
92
- PYTHON_INCLUDE_DIRS
93
- PYTHON_EXECUTABLE
94
- SWIG_EXECUTABLE )
95
- endif ()
96
- endif ()
71
+ FindPython3 ()
72
+ if (NOT PYTHON3_FOUND AND NOT CMAKE_SYSTEM_NAME STREQUAL Windows )
73
+ FindPython2 ()
97
74
endif ()
98
75
endif ()
99
76
else ()
100
77
message (STATUS "SWIG 2 or later is required for Python support in LLDB but could not be found" )
101
78
endif ()
102
79
103
-
104
80
include (FindPackageHandleStandardArgs )
105
81
find_package_handle_standard_args (PythonInterpAndLibs
106
82
FOUND_VAR
0 commit comments