-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxmake.lua
85 lines (61 loc) · 1.84 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
add_rules("mode.debug", "mode.release")
set_targetdir("bin")
set_languages("c++20")
-- add_defines('PROJECT_ROOT_DIR="$(projectdir)"')
add_requires("glfw","glm","stb","glad")
add_requires("gtest","fmt")
add_requires("libsdl" ,"libsdl_mixer")
add_requires("freetype")
add_packages("glfw","glm","stb","glad","fmt")
add_packages("libsdl" ,"libsdl_mixer")
add_includedirs("./pkgs/")
add_includedirs("./include/")
local audio_backend = "sdl";
if(audio_backend == "sdl") then
add_files("pkgs/audio/sdl_wrapper/**.cc")
end
includes("./pkgs/m_log")
add_includedirs("./pkgs/m_log")
-- Add this to top_level xmake if msvc
if is_os("windows") then
add_cxxflags("/Zc:preprocessor")
end
target("breakout")
set_kind("binary")
add_files("src/**.cpp")
add_includedirs("include")
add_packages("glfw","glm","stb","glad")
add_packages("fmt")
-- add_packages("miniaudio")
add_packages("freetype")
add_deps("m_log")
target("test")
set_kind("binary")
add_files("test/*.cpp")
add_files("test/*.cc")
add_includedirs("src","include")
add_defines("DISABLE_TEST_CASE")
add_packages("glfw","glm","stb")
add_packages("glad")
add_packages("gtest")
add_packages("libsdl" ,"libsdl_mixer")
add_deps("m_log")
--> Add the Audio Library
--add_requires("openal-soft")
-- add_requires("miniaudio")
-- add_packages("miniaudio")
-- if(is_os("windows")) then
-- add_links("mmdevapi")
-- end
-- add_files("pkgs/miniaudio_wrapper/**.cc")
-- target("manual_test_audio")
-- set_kind("binary")
-- add_files("test/manual/with_deps/audio_test.cc")
-- target("manual_test_miniaudio_playback")
-- set_kind("binary")
-- add_files("test/manual/with_deps/miniaudio_playback_test.cc")
target("manual_test_sdl_play_wave")
set_kind("binary")
add_files("test/manual/with_deps/sdl_play_wave_test.cc")
add_packages("libsdl" ,"libsdl_mixer")
add_deps("m_log")