File tree Expand file tree Collapse file tree 4 files changed +19
-16
lines changed Expand file tree Collapse file tree 4 files changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,8 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar
189
189
COMMAND ${CMAKE_COMMAND} -E copy ${PYTHON_DLL_NATIVE_PATH} ${LLDB_BIN_DIR} VERBATIM
190
190
COMMENT "Copying Python DLL to LLDB binaries directory." )
191
191
endif ()
192
+
193
+
192
194
endfunction ()
193
195
194
196
if (${LLDB_USE_STATIC_BINDINGS} )
Original file line number Diff line number Diff line change 7
7
if (LUA_LIBRARIES AND LUA_INCLUDE_DIR AND SWIG_EXECUTABLE )
8
8
set (LUAANDSWIG_FOUND TRUE )
9
9
else ()
10
- find_package (SWIG 3.0 QUIET )
11
- if (SWIG_FOUND OR LLDB_USE_STATIC_BINDINGS )
12
- if (LLDB_USE_STATIC_BINDINGS )
13
- set (SWIG_EXECUTABLE "/not/found" )
14
- endif ()
10
+ if (LLDB_ENABLE_SWIG OR LLDB_USE_STATIC_BINDINGS )
15
11
find_package (Lua 5.3 EXACT )
16
12
if (LUA_FOUND AND SWIG_FOUND )
17
13
mark_as_advanced (
@@ -23,12 +19,12 @@ else()
23
19
message (STATUS "SWIG 3 or later is required for Lua support in LLDB but could not be found" )
24
20
endif ()
25
21
22
+
26
23
include (FindPackageHandleStandardArgs )
27
24
find_package_handle_standard_args (LuaAndSwig
28
25
FOUND_VAR
29
26
LUAANDSWIG_FOUND
30
27
REQUIRED_VARS
31
28
LUA_LIBRARIES
32
- LUA_INCLUDE_DIR
33
- SWIG_EXECUTABLE )
29
+ LUA_INCLUDE_DIR )
34
30
endif ()
Original file line number Diff line number Diff line change @@ -38,12 +38,8 @@ endmacro()
38
38
if (Python3_LIBRARIES AND Python3_INCLUDE_DIRS AND Python3_EXECUTABLE AND SWIG_EXECUTABLE )
39
39
set (PYTHONANDSWIG_FOUND TRUE )
40
40
else ()
41
- find_package (SWIG 3.0 )
42
- if (SWIG_FOUND OR LLDB_USE_STATIC_BINDINGS )
43
- if (LLDB_USE_STATIC_BINDINGS )
44
- set (SWIG_EXECUTABLE "/not/found" )
45
- endif ()
46
- FindPython3 ()
41
+ if (LLDB_ENABLE_SWIG OR LLDB_USE_STATIC_BINDINGS )
42
+ FindPython3 ()
47
43
else ()
48
44
message (STATUS "SWIG 3 or later is required for Python support in LLDB but could not be found" )
49
45
endif ()
66
62
REQUIRED_VARS
67
63
Python3_LIBRARIES
68
64
Python3_INCLUDE_DIRS
69
- Python3_EXECUTABLE
70
- SWIG_EXECUTABLE )
65
+ Python3_EXECUTABLE )
71
66
endif ()
Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ macro(add_optional_dependency variable description package found)
56
56
message (STATUS "${description} : ${${variable} }" )
57
57
endmacro ()
58
58
59
+ add_optional_dependency (LLDB_ENABLE_SWIG "Enable SWIG to generate LLDB bindings" SWIG SWIG_FOUND VERSION 3 )
60
+
61
+ # BEGIN SWIFT MOD
62
+ if (LLDB_ENABLE_SWIG )
63
+ set (LLDB_ENABLE_STATIC_BINDINGS FALSE )
64
+ else ()
65
+ set (LLDB_ENABLE_STATIC_BINDINGS TRUE )
66
+ endif ()
67
+ option (LLDB_USE_STATIC_BINDINGS "Use the static Python bindings." ${LLDB_ENABLE_STATIC_BINDINGS} )
68
+ # END SWIFT MOD
69
+
59
70
add_optional_dependency (LLDB_ENABLE_LIBEDIT "Enable editline support in LLDB" LibEdit LibEdit_FOUND )
60
71
add_optional_dependency (LLDB_ENABLE_CURSES "Enable curses support in LLDB" CursesAndPanel CURSESANDPANEL_FOUND )
61
72
add_optional_dependency (LLDB_ENABLE_LZMA "Enable LZMA compression support in LLDB" LibLZMA LIBLZMA_FOUND )
@@ -74,7 +85,6 @@ option(LLDB_SKIP_DSYM "Whether to skip generating a dSYM when installing lldb."
74
85
75
86
# BEGIN SWIFT MOD
76
87
option (LLDB_ENABLE_SWIFT_SUPPORT "Enable swift support" ON )
77
- option (LLDB_USE_STATIC_BINDINGS "Use the static Python bindings." OFF )
78
88
option (LLDB_ENABLE_WERROR "Fail and stop if a warning is triggered." ${LLVM_ENABLE_WERROR} )
79
89
if (LLDB_ENABLE_SWIFT_SUPPORT )
80
90
add_definitions ( -DLLDB_ENABLE_SWIFT )
You can’t perform that action at this time.
0 commit comments