-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake5.lua
122 lines (90 loc) · 2.21 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
-- TODO: rewrite defines and links
workspace "flex-render"
architecture "x64"
configurations
{
"Debug",
"Release",
"Dist"
}
-- example : "Debug-windows-x86_64"
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
-------------------------- PROJECTS -----------------------------
-- Flex Render -------------------------------
project "flex-render"
location "./"
kind "SharedLib"
language "C++"
-- example : "bin/Debug-windows-x86_64/flex-render"
targetdir ("lib/" .. outputdir .. "/")
objdir ("lib/" .. outputdir .. "/%{prj.name}-int")
files
{
"%{prj.location}/src/**.h",
"%{prj.location}/src/**.cpp"
}
includedirs
{
"%{prj.location}/vendor/flex-math/src",
}
links {
"flex-math"
}
-- Windows options
filter "system:windows"
cppdialect "C++17"
staticruntime "On"
systemversion "latest"
defines
{
"FR_PLATFORM_WINDOWS",
"FM_PLATFORM_WINDOWS",
"FR_BUILD_DLL",
}
-- General build modes options for platforms
filter "configurations:Debug"
defines "FR_DEBUG"
symbols "On" -- acts like -g gcc flag
filter "configurations:Release"
defines "FR_RELEASE"
optimize "On"
filter "configurations:Dist"
defines "FR_DIST"
optimize "On"
-- Flex Math -------------------------------
project "flex-math"
location "vendor/flex-math"
kind "SharedLib"
language "C++"
-- example : "bin/Debug-windows-x86_64/flex-math"
targetdir ("lib/" .. outputdir .. "/")
objdir ("lib/" .. outputdir .. "/%{prj.name}-int")
files
{
"%{prj.location}/src/**.h",
"%{prj.location}/src/**.cpp",
}
-- Windows options
filter "system:windows"
cppdialect "C++17"
staticruntime "On"
systemversion "latest"
defines
{
"FM_PLATFORM_WINDOWS",
"FM_BUILD_DLL"
}
-- postbuildcommands
-- { -- will copy dll from engine build dir into sandbox build dir
-- ("{COPY} %{cfg.buildtarget.relpath} %{wks.location}/bin/" .. outputdir .. "/Sandbox/*")
-- }
-- General build modes options for platforms
filter "configurations:Debug"
defines "FM_DEBUG"
symbols "On" -- acts like -g gcc flag
filter "configurations:Release"
defines "FM_RELEASE"
optimize "On"
filter "configurations:Dist"
defines "FM_DIST"
optimize "On"