aboutsummaryrefslogtreecommitdiff
path: root/cmake/LuaHelpers.cmake
blob: 00ecd1357f160b0f352f6e525f162c1892cea385 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#
# Functions to help checking for a Lua interpreter
#

# Check if a module is available in Lua
function(check_lua_module LUA_PRG_PATH MODULE RESULT_VAR)
  execute_process(COMMAND ${LUA_PRG_PATH} -l "${MODULE}" -e ""
    RESULT_VARIABLE module_missing)
  if(module_missing)
    set(${RESULT_VAR} False PARENT_SCOPE)
  else()
    set(${RESULT_VAR} True PARENT_SCOPE)
  endif()
endfunction()