-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient-premake.lua
83 lines (67 loc) · 2 KB
/
client-premake.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
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
NTIncludeDir = {}
NTIncludeDir["spdlog"] = "nutella/vendor/spdlog/include"
NTIncludeDir["GLFW"] = "nutella/vendor/GLFW/include"
NTIncludeDir["Glad"] = "nutella/vendor/Glad/include"
NTIncludeDir["ImGui"] = "nutella/vendor/imgui"
NTIncludeDir["glm"] = "nutella/vendor/glm"
NTIncludeDir["stb_image"] = "nutella/vendor/stb_image"
-- include vendor premake files
include "nutella/vendor/GLFW"
include "nutella/vendor/Glad"
include "nutella/vendor/imgui"
project "Nutella"
location "nutella"
kind "SharedLib"
language "C++"
cppdialect "C++17"
staticruntime "Off"
pchheader "ntpch.hpp"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files {
"%{prj.location}/src/**.cpp",
"%{prj.location}/src/**.hpp",
"%{prj.location}/vendor/stb_image/stb_image.cpp"
}
includedirs {
"%{prj.location}/src",
"%{NTIncludeDir.spdlog}",
"%{NTIncludeDir.GLFW}",
"%{NTIncludeDir.Glad}",
"%{NTIncludeDir.ImGui}",
"%{NTIncludeDir.glm}",
"%{NTIncludeDir.stb_image}"
}
links {
"GLFW", "GL", "dl",
"Glad",
"ImGui"
}
linkoptions {
"-pthread"
}
if nutellaPath then
defines { "NT_PATH=" .. nutellaPath }
else
define { "NT_PATH=" }
end
defines {
"GLFW_INCLUDE_NONE"
}
postbuildcommands {
"mkdir -p ../bin/" .. outputdir .. "/Sandbox",
"{COPY} %{cfg.buildtarget.relpath} ../bin/" .. outputdir .. "/Sandbox/%{cfg.buildtarget.name}"
}
filter "configurations:Debug"
defines {"NT_DEBUG", "NT_ENABLE_ASSERTS", "NT_PROFILE"}
runtime "Debug"
symbols "On"
filter "configurations:Release"
defines {"NT_RELEASE", "NT_PROFILE"}
runtime "Release"
optimize "On"
filter "configurations:Dist"
defines "NT_DIST"
runtime "Release"
optimize "On"