[LLDB] Fix building without SWIG
authorMartin Storsjö <martin@martin.st>
Sun, 22 Dec 2019 08:01:09 +0000 (10:01 +0200)
committerMartin Storsjö <martin@martin.st>
Sun, 22 Dec 2019 08:04:56 +0000 (10:04 +0200)
Previously, SWIG was only a hard dependency if python bindings were
enabled.

Since bf03e17c570171c7a52117fe63ace89d58f328d5, scripts/CMakeLists.txt
is included unconditionally, while that file adds the hard dependency
on SWIG.

Instead, only include that file if either python or lua bindings are
enabled.

lldb/CMakeLists.txt

index 39e12b2..ff3d8ae 100644 (file)
@@ -52,7 +52,9 @@ if (LLDB_ENABLE_PYTHON)
     CACHE STRING "Path where Python modules are installed, relative to install prefix")
 endif ()
 
-add_subdirectory(scripts)
+if (LLDB_ENABLE_PYTHON OR LLDB_ENABLE_LUA)
+  add_subdirectory(scripts)
+endif ()
 
 # We need the headers generated by instrinsics_gen before we can compile
 # any source file in LLDB as the imported Clang modules might include