forked from jarikomppa/soloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
106 lines (87 loc) · 2.37 KB
/
premake5.lua
File metadata and controls
106 lines (87 loc) · 2.37 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
local with_sdl = false
local with_sdl2 = false
local with_sdl3 = false
local with_openal = false
local with_portaudio = false
local with_xaudio2 = false
local with_winmm = false
local with_coreaudio = false
local with_alsa = false
local with_jack = false
local with_miniaudio = false
local with_null = true
-- Detect platform-specific defaults
if os.target() == "windows" then
with_winmm = true
elseif os.target() == "macosx" then
with_coreaudio = true
else
with_alsa = true
end
-- Define projects
project "SoLoud"
kind "StaticLib"
language "C++"
staticruntime "off"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files {
"src/audiosource/**.cpp",
"src/filter/**.cpp",
"src/core/**.cpp"
}
includedirs { "include", "src" }
-- Backend-specific configurations
if with_openal then
defines { "WITH_OPENAL" }
files { "src/backend/openal/**.cpp" }
end
if with_alsa then
defines { "WITH_ALSA" }
files { "src/backend/alsa/**.cpp" }
end
if with_sdl then
defines { "WITH_SDL" }
files { "src/backend/sdl/**.cpp" }
end
if with_sdl2 then
defines { "WITH_SDL2" }
files { "src/backend/sdl2/**.cpp" }
end
if with_miniaudio then
defines { "WITH_MINIAUDIO" }
files { "src/backend/miniaudio/**.cpp" }
end
if with_null then
defines { "WITH_NULL" }
files { "src/backend/null/**.cpp" }
end
filter "system:windows"
if with_winmm then
defines { "WITH_WINMM" }
files { "src/backend/winmm/**.cpp" }
end
filter "system:macosx"
if with_coreaudio then
defines { "WITH_COREAUDIO" }
files { "src/backend/coreaudio/**.cpp" }
end
filter "system:linux"
if with_alsa then
defines { "WITH_ALSA" }
links { "asound" }
end
filter "system:windows"
defines { "_CRT_SECURE_NO_WARNINGS" }
flags { "MultiProcessorCompile" }
staticruntime "off"
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "Speed"
filter "configurations:Dist"
defines { "NDEBUG" }
optimize "Speed"
filter {}