Files
clang-p2996/lldb/cmake/modules/FindLuaAndSwig.cmake
Jonas Devlieghere e0053bc04e [lldb] Bump SWIG minimum version to 4
SWIG 4 was released in 2019 and has been the de-facto standard for a
while now. All bots are running SWIG 4.0 or later.

This was motivated by #64279 which discovered that 662548c broke the
LLDB build with SWIG 3 on Windows.

Differential revision: https://reviews.llvm.org/D156804
2023-08-04 14:34:01 -07:00

31 lines
855 B
CMake

#.rst:
# FindLuaAndSwig
# --------------
#
# Find Lua and SWIG as a whole.
if(LUA_LIBRARIES AND LUA_INCLUDE_DIR AND LLDB_ENABLE_SWIG)
set(LUAANDSWIG_FOUND TRUE)
else()
if (LLDB_ENABLE_SWIG)
find_package(Lua 5.3 EXACT)
if(LUA_FOUND)
mark_as_advanced(
LUA_LIBRARIES
LUA_INCLUDE_DIR)
endif()
else()
message(STATUS "SWIG 4 or later is required for Lua support in LLDB but could not be found")
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LuaAndSwig
FOUND_VAR
LUAANDSWIG_FOUND
REQUIRED_VARS
LUA_LIBRARIES
LUA_INCLUDE_DIR
LLDB_ENABLE_SWIG)
endif()