brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · c5df29e Raw
44 lines · plain
1#.rst:2# FindLuaAndSwig3# --------------4#5# Find Lua and SWIG as a whole.6 7if(LUA_LIBRARIES AND LUA_INCLUDE_DIR AND LLDB_ENABLE_SWIG)8  set(LUAANDSWIG_FOUND TRUE)9else()10  if (LLDB_ENABLE_SWIG)11    find_package(Lua 5.3)12    if(LUA_FOUND)13      # Find the Lua executable. Only required to run a subset of the Lua14      # tests.15      find_program(LUA_EXECUTABLE16        NAMES17        "lua"18        "lua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}"19      )20      mark_as_advanced(21        LUA_LIBRARIES22        LUA_INCLUDE_DIR23        LUA_VERSION_MINOR24        LUA_VERSION_MAJOR25        LUA_EXECUTABLE)26    endif()27  else()28    message(STATUS "SWIG 4 or later is required for Lua support in LLDB but could not be found")29  endif()30 31 32  include(FindPackageHandleStandardArgs)33  find_package_handle_standard_args(LuaAndSwig34                                    FOUND_VAR35                                      LUAANDSWIG_FOUND36                                    REQUIRED_VARS37                                      LUA_EXECUTABLE38                                      LUA_LIBRARIES39                                      LUA_INCLUDE_DIR40                                      LUA_VERSION_MINOR41                                      LUA_VERSION_MAJOR42                                      LLDB_ENABLE_SWIG)43endif()44