-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake5.lua
91 lines (75 loc) · 2.13 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
local solution_dir = "build/" .. _ACTION
function SetupIncludeDirs()
includedirs {
"src"
}
end
function SetupSlotion()
location(solution_dir)
solution "CppReflection"
configurations {
"Debug",
"Release"
}
platforms { "Win64" }
warnings "Extra"
floatingpoint "Fast"
symbols "On"
cppdialect "C++11"
rtti "Off"
characterset ("MBCS")
configuration "Debug*"
defines { "DEBUG", "_DEBUG" }
targetdir ( solution_dir .. "lib/Debug" )
configuration "Release*"
defines { "NDEBUG"}
optimize "Speed"
targetdir ( solution_dir .. "lib/Release" )
filter { "platforms:Win*", "configurations:Debug*" }
defines { "WIN32", "_WINDOWS", "_CRT_SECURE_NO_WARNINGS", "NOMINMAX", "_REFL_GEN_OFF_" }
system "Windows"
architecture "x86_64"
staticruntime "Off"
filter { "platforms:Win*", "configurations:Release*" }
defines { "WIN32", "_WINDOWS", "_CRT_SECURE_NO_WARNINGS", "NOMINMAX", "_REFL_GEN_OFF_" }
system "Windows"
architecture "x86_64"
staticruntime "Off"
filter { "system:windows", "action:vs*"}
flags { "MultiProcessorCompile" }
end
function SetupExample()
project "Example"
kind "ConsoleApp"
language "C++"
files {
"src/*.*",
"example/*.*"
}
filter { "configurations:Debug*" }
targetdir (solution_dir .. "/bin/Debug")
filter { "configurations:Release*" }
targetdir (solution_dir .. "/bin/release")
end
function SetupReflGen()
project "MetaGen"
kind "ConsoleApp"
language "C++"
local generate_reflection_code = "..\\..\\meta_gen\\bin\\meta_gen.exe ..\\..\\example\\main.cpp -- -I. $CFLAGS"
filter { "configurations:Debug*" }
targetdir (solution_dir .. "/bin/Debug")
prebuildcommands
{
generate_reflection_code
}
filter { "configurations:Release*" }
targetdir (solution_dir .. "/bin/release")
prebuildcommands
{
generate_reflection_code
}
end
SetupIncludeDirs()
SetupSlotion()
SetupExample()
SetupReflGen()