-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmake.lua
28 lines (21 loc) · 1.01 KB
/
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
26
27
28
add_requires("sfml ~2.5.1", { alias = "sfml" })
add_requires("glm")
add_requires("vcpkg::globjects", { alias = "globjects" })
add_requires("vcpkg::glbinding", { alias = "glbinding" })
add_requires("assimp")
target("13-terrain")
set_languages("cxx20")
set_kind("binary")
add_packages("sfml", "glm", "globjects", "glbinding", "assimp")
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
set_pcxxheader("src/common/stdafx.hpp")
add_files("src/main.cpp", "src/common/AbstractMesh.cpp", "src/common/AbstractMeshBuilder.cpp", "src/common/AssimpModel.cpp", "src/common/MultimeshModel.cpp", "src/common/SingleMeshModel.cpp")
add_includedirs("src/")
after_build(function (target)
os.cp("$(scriptdir)/media", path.join(path.directory(target:targetfile()), "media"))
end)