-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmake.lua
25 lines (19 loc) · 850 Bytes
/
xmake.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
add_requires("sfml ~2.5.1", { alias = "sfml" })
add_requires("glm")
add_requires("vcpkg::globjects", { alias = "globjects" })
add_requires("vcpkg::glbinding", { alias = "glbinding" })
target("05-texture")
set_languages("cxx20")
set_kind("binary")
add_packages("sfml", "glm", "globjects", "glbinding")
if is_plat("macosx") then
-- this prevents "-[SFOpenGLView enableKeyRepeat]: unrecognized selector sent to instance 0x7fa5c2507970" runtime exception
add_ldflags("-ObjC")
-- this prevents linker errors
add_frameworks("Foundation", "OpenGL", "IOKit", "Cocoa", "Carbon")
end
add_files("main.cpp")
after_build(function (target)
os.cp("$(scriptdir)/../media", path.join(path.directory(target:targetfile()), "media"))
os.cp("$(scriptdir)/media", path.join(path.directory(target:targetfile()), "media"))
end)