-
Notifications
You must be signed in to change notification settings - Fork 19
/
premake5.lua
73 lines (59 loc) · 1.35 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
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
newoption {
trigger = "build-tests",
description = "Enables tests build"
}
newoption {
trigger = "build-samples",
description = "Enables tests build"
}
workspace( "Ashes" )
sourceDir = os.getcwd()
rootDir = path.getdirectory( sourceDir )
binaryDir = path.join( rootDir, "build", "premake" )
modulesDir = path.join( sourceDir, "Premake" )
configurations{ "Debug", "Release" }
platforms{ "x32", "x64" }
location( binaryDir )
language( "C++" )
cppdialect( "C++17" )
filter( "platforms:x86" ) architecture( "x86" )
filter( "platforms:x64" ) architecture( "x64" )
if ( os.istarget( "Windows" ) )
then
binaryLinks = "DbgHelp"
else
binaryLinks = "dl"
end
filter( "configurations:Debug" )
defines( "DEBUG" )
symbols( "On" )
filter( "configurations:Release" )
defines( "NDEBUG" )
optimize( "On" )
outputDir = path.join( rootDir, "binaries" )
executableDir = "bin"
staticLibDir = "lib"
assetsDir = "share"
if ( os.istarget( "Windows" ) )
then
sharedLibDir = "bin"
else
sharedLibDir = "lib"
end
if ( os.istarget( "Linux" ) )
then
renderLibXLib = 1
end
include( "libs_config.lua" )
group( "Core" )
include( "Utils/premake5.lua" )
group( "Ashes" )
include( "Ashes/premake5.lua" )
if _OPTIONS["build-tests"] then
group( "Test" )
include( "Test/premake5.lua" )
end
if _OPTIONS["build-samples"] then
group( "Samples" )
include( "Samples/premake5.lua" )
end