lib "lua" src("*vendor/lua", "-vendor/lua/lua.c") include "vendor/lua" include "vendor/headers" warnings(false) lib "sol2" include "vendor/sol2" dependency "lua" lib "stduuid" include "vendor/stduuid/include" link "uuid" lib "ecs" path "ecs" dependency("sol2", "stduuid") lib "ecs-lua" path "ecs-lua" dependency "ecs" subfile("../iohelper/flint.lua", "iohelper") lib "ecs-serial" path "ecs-serial" dependency("ecs", "iohelper") function codegen(path, file) local handle = io.popen("mkdir " .. config.paths.build .. "/generated") handle:close() local command = "python test.py " .. path .. "/" .. file .. " > " .. config.paths.build .. "/generated/ecs_" .. file handle = io.popen(command) handle:close() end executable "test" path "test" dependency "ecs-lua" dependency "ecs-serial" hook(step.PRE_BUILD, codegen, "test/include", "components.h") include(config.paths.build .. "/generated/") git("https://github.com/glfw/glfw", "3.3-stable", "glfw") lib "glfw" include "@glfw@/include" src "@glfw@/src/{context,init,input,monitor,window}.c" src "@glfw@/src/egl_context.c" if config.platform.target == "linux" then src "@glfw@/src/glx_context.c" src "@glfw@/src/x11_{init,monitor,window}.c" src "@glfw@/src/posix_{time,thread}.c" src "@glfw@/src/linux_joystick.c" src "@glfw@/src/xkb_unicode.c" src "@glfw@/src/osmesa_context.c" define "_GLFW_X11" -- @todo This is needed for strdup to work define "_POSIX_C_SOURCE=200809L" link("dl", "X11", "Xrandr", "Xinerama", "Xcursor", "GL", "GLU") elseif config.platform.target == "windows" then end lang "c11" warnings(false) lib "network-shared" path "network-shared" dependency "ecs-serial" hook(step.PRE_BUILD, codegen, "network-shared/include", "network_components.h") include(config.paths.build .. "/generated/") executable "server" path "network-server" dependency "network-shared" dependency "iohelper" threads() executable "client" path "network-client" dependency "network-shared" dependency "glfw" threads() run_dir "test" run_target "test"