forked from CzekoladowyKocur/CinMath
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
125 lines (99 loc) · 2.43 KB
/
premake5.lua
File metadata and controls
125 lines (99 loc) · 2.43 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
WorkspaceName = "CinMath"
OutputDirectory = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
CinMath = "CinMath"
UnitTests = "UnitTests"
workspace (WorkspaceName)
architecture "x64"
platforms "x64"
targetdir (OutputDirectory)
startproject (UnitTests)
configurations
{
"Debug",
"Release",
}
flags
{
"MultiProcessorCompile",
}
warnings "Extra" -- Warning level
filter "configurations:Debug"
defines "CIN_DEBUG" -- Engine define
symbols "On" -- Specifies whether the compiler should generate debug symbols
optimize "Off" -- Disables Optimization
-- optimize "Debug" -- Optimization with some debugger step-through support
runtime "Debug" -- Specifies the type of runtime library to use
staticruntime "on" -- Sets runtime library to "MultiThreaded" instead of "MultiThreadedDLL"
filter "configurations:Release"
defines "CIN_RELEASE"
defines "NDEBUG" -- Explicitly define NDEBUG
symbols "On"
optimize "On"
runtime "Release"
staticruntime "on"
-- Platforms --
filter "system:windows"
defines "CIN_PLATFORM_WINDOWS"
systemversion "latest"
filter "system:linux"
defines "CIN_PLATFORM_LINUX"
filter "system:macosx"
defines "CIN_PLATFORM_MACOS"
filter "system:ios"
defines "CIN_PLATFORM_IOS"
filter "system:android"
defines "CIN_PLATFORM_ANDROID"
group "ThirdParty"
include "ThirdParty"
group ""
project (CinMath)
location (CinMath)
language "C++"
cppdialect "C++20"
kind "Utility"
targetdir ("bin/" .. (OutputDirectory) .. "/%{prj.name}")
objdir ("bin-int/" .. (OutputDirectory) .. "/%{prj.name}")
files
{
"%{prj.name}/include/CinMath/**.h",
"%{prj.name}/include/CinMath/**.inl",
}
includedirs
{
}
project (UnitTests)
location (UnitTests)
language "C++"
cppdialect "C++20"
kind "ConsoleApp"
targetdir ("bin/" .. (OutputDirectory) .. "/%{prj.name}")
objdir ("bin-int/" .. (OutputDirectory) .. "/%{prj.name}")
files
{
"%{prj.name}/src/UnitTests.h",
"%{prj.name}/src/Benchmark.h",
"%{prj.name}/src/UnitTests.cpp",
"%{prj.name}/src/Benchmark.cpp",
"%{prj.name}/src/Main.cpp",
}
includedirs
{
"CinMath/include",
"ThirdParty/glm",
}
project ("Examples")
location ("Examples")
language "C++"
cppdialect "C++20"
kind "ConsoleApp"
targetdir ("bin/" .. (OutputDirectory) .. "/%{prj.name}")
objdir ("bin-int/" .. (OutputDirectory) .. "/%{prj.name}")
files
{
"%{prj.name}/src/Example.cpp",
}
includedirs
{
"CinMath/include",
"ThirdParty/glm",
}