From 87e2d433f5d55ffbf00bb91fcf1b3f332e31b54f Mon Sep 17 00:00:00 2001 From: on-three Date: Thu, 28 Feb 2019 11:50:26 -0800 Subject: [PATCH] Added emscripten support for web builds --- lua-5.3.3/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua-5.3.3/CMakeLists.txt b/lua-5.3.3/CMakeLists.txt index 4ef0038..494e648 100644 --- a/lua-5.3.3/CMakeLists.txt +++ b/lua-5.3.3/CMakeLists.txt @@ -36,5 +36,8 @@ set(LUA_LIB_SRCS set(LUA_LIB_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/src) add_library(lua_static STATIC ${LUA_LIB_SRCS}) target_include_directories(lua_static PUBLIC ${LUA_LIB_INCLUDE}) -target_compile_definitions(lua_static PUBLIC LUA_USE_POSIX) - +set(LUA_DEFINITIONS LUA_USE_POSIX) +if(EMSCRIPTEN) + unset(LUA_DEFINITIONS) +endif() +target_compile_definitions(lua_static PUBLIC ${LUA_DEFINITIONS})