-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmake.lua
30 lines (22 loc) · 1.26 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
29
30
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("22-fast-approximation-anti-aliasing")
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
add_files("src/main.cpp", "src/common/AbstractMesh.cpp", "src/common/AbstractMeshBuilder.cpp", "src/common/AbstractSkyboxBuilder.cpp", "src/common/AssimpModel.cpp", "src/common/CubemapSkyboxBuilder.cpp", "src/common/MultimeshModel.cpp", "src/common/SimpleSkyboxBuilder.cpp", "src/common/SingleMeshModel.cpp", "src/common/Skybox.cpp")
set_pcxxheader("src/stdafx.hpp")
add_includedirs("src/")
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)