Added emscripten support for web builds

This commit is contained in:
on-three 2019-02-28 11:50:26 -08:00
parent c550700479
commit 87e2d433f5

View File

@ -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})