aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2c2587ec0b..2ca2385d8f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -553,7 +553,10 @@ if(NOT WIN32)
endif()
endforeach()
elseif(LUA_PRG MATCHES "luajit")
- set(LUAC_PRG "${LUA_PRG} -b -s %s -" CACHE STRING "Format for compiling to Lua bytecode")
+ check_lua_module(${LUA_PRG} "jit.bcsave" LUAJIT_HAS_JIT_BCSAVE)
+ if(LUAJIT_HAS_JIT_BCSAVE)
+ set(LUAC_PRG "${LUA_PRG} -b -s %s -" CACHE STRING "Format for compiling to Lua bytecode")
+ endif()
endif()
endif()