From 67bb01ae27db3cbba9e2e908c4e6612040f650aa Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Sun, 19 Dec 2021 14:00:53 -0700 Subject: [PATCH] chore(build): add option to disable Lua bytecode compilation (#16722) Include a build option to explicitly disable Lua bytecode compilation. This is needed in some situations where the existing checks are not sufficient (e.g. cross compilation). --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ca2385d8f..9f1829cf55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -543,7 +543,9 @@ endif() message(STATUS "Using Lua interpreter: ${LUA_PRG}") -if(NOT WIN32) +option(COMPILE_LUA "Pre-compile Lua sources into bytecode (for sources that are included in the binary)" ON) + +if(COMPILE_LUA AND NOT WIN32) if(PREFER_LUA) foreach(CURRENT_LUAC_PRG luac5.1 luac) find_program(_CHECK_LUAC_PRG ${CURRENT_LUAC_PRG})