forked from FFmpeg/FFmpeg
-
Notifications
You must be signed in to change notification settings - Fork 10
/
premake5.lua
41 lines (38 loc) · 1.02 KB
/
premake5.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
group("third_party")
--
-- Call this function in subproject scope to set the needed include
-- dirs and defines.
--
function ffmpeg_common()
defines({
"HAVE_AV_CONFIG_H",
"_USE_MATH_DEFINES", -- For M_PI/etc
})
local ffmpeg_root = ".."
includedirs({
ffmpeg_root,
})
filter({"platforms:Windows", "configurations:Debug or configurations:Checked"})
optimize("Size") -- dead code elimination is mandatory
removebuildoptions({
"/RTCsu", -- '/O1' and '/RTCs' command-line options are incompatible
})
filter({"platforms:Windows", "configurations:Release"})
removeflags({
"LinkTimeOptimization", -- disable whole program optimization, breaks dead code elimination
})
filter("platforms:Windows")
includedirs({
ffmpeg_root .. "/compat/atomics/win32",
})
links({
"bcrypt",
})
filter("platforms:Linux")
includedirs({
ffmpeg_root .. "/compat/atomics/gcc",
})
filter({})
end
include("libavcodec/premake5.lua")
include("libavutil/premake5.lua")