add wine xmake.lua

This commit is contained in:
2022-12-11 12:59:57 +01:00
parent 6e0923ac75
commit 0e0368cada

View File

@@ -12,7 +12,7 @@ target("TowerDefense")
add_links("pthread")
set_languages("c++17")
add_packages("zlib", "libsdl", "glew", "opengl", "glm")
if is_os("windows") then
@@ -40,3 +40,12 @@ target("TowerDefense")
add_cxflags("-pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused")
end
-- run windows program with wine on linux
if is_host("linux") and is_os("windows") then
on_run(function(target)
os.cd("test")
os.runv("wine", {target:targetfile()})
end)
end