Commit ef0a07c0 authored by Daniel Hahler's avatar Daniel Hahler

cmake/LuaHelpers.cmake: check_lua_module: use 'lua -l'

It only shortens the traceback a bit for when a module is not found
though, only removing the "(command line):1: in main chunk" (with
lua5.2).
parent 88519034
......@@ -4,7 +4,7 @@
# Check if a module is available in Lua
function(check_lua_module LUA_PRG_PATH MODULE RESULT_VAR)
execute_process(COMMAND ${LUA_PRG_PATH} -e "require('${MODULE}')"
execute_process(COMMAND ${LUA_PRG_PATH} -l "${MODULE}" -e ""
RESULT_VARIABLE module_missing)
if(module_missing)
set(${RESULT_VAR} False PARENT_SCOPE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment