-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
121 lines (93 loc) · 2.89 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
workspace "sglr"
architecture "x64"
configurations
{
"Debug",
"Release"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "sglr"
location "sglr"
language "C++"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files {
-- base
"%{prj.name}/resource.h",
"%{prj.name}/sglr.rc",
"%{prj.name}/sglr.ico",
"%{prj.name}/main.cpp",
-- src folder
"%{prj.name}/src/**.h",
"%{prj.name}/src/**.cpp",
-- sglr folder
"%{prj.name}/include/sglr/**.h",
"%{prj.name}/src/sglr/**.cpp",
-- shader basic
"%{prj.name}/assets/shaders/**.glsl",
-- imgui
"%{prj.name}/vendor/imgui/imgui.cpp",
"%{prj.name}/vendor/imgui/imgui_draw.cpp",
"%{prj.name}/vendor/imgui/imgui_tables.cpp",
"%{prj.name}/vendor/imgui/imgui_widgets.cpp",
"%{prj.name}/vendor/imgui/imgui_demo.cpp",
"%{prj.name}/vendor/imgui/backends/imgui_impl_sdl3.cpp",
"%{prj.name}/vendor/imgui/backends/imgui_impl_opengl3.cpp"
}
includedirs {
"%{prj.name}/include",
"%{prj.name}/vendor/spdlog/include", -- SPDLOG
"%{prj.name}/vendor/tinyxml2", -- TINYXML2
"%{prj.name}/vendor/glm/glm", -- GLM
"%{prj.name}/vendor/SDL/include", -- SDL
"%{prj.name}/vendor/glew/include", -- GLEW
"%{prj.name}/vendor/mio/include", -- MIO
"%{prj.name}/vendor/stbimage", -- STBIMAGE
"%{prj.name}/vendor/assimp/include", -- ASSIMP
"%{prj.name}/vendor/assimp/BUILD/include",
-- IMGUI
"%{prj.name}/vendor/imgui/imconfig.h",
"%{prj.name}/vendor/imgui/imgui.h",
"%{prj.name}/vendor/imgui/imgui_internal.h",
"%{prj.name}/vendor/imgui/imstb_rectpack.h",
"%{prj.name}/vendor/imgui/imstb_textedit.h",
"%{prj.name}/vendor/imgui/imstb_truetype.h",
-- IMGUIBACKENDS
"%{prj.name}/vendor/imgui/backends/imgui_impl_opengl3.h",
"%{prj.name}/vendor/imgui/backends/imgui_impl_sdl3.h"
}
libdirs {
"%{prj.name}/vendor/glew/lib/Release/x64", -- glew
"%{prj.name}/vendor/SDL/BUILD/Release", -- SDL
"%{prj.name}/vendor/assimp/BUILD/lib/Release", -- assip
"%{prj.name}/vendor/tinyxml2/BUILD/Release" -- tinyxml2
}
links {
"opengl32.lib",
"SDL3.lib",
"SDL3_test.lib",
"glew32.lib",
"tinyxml2.lib",
"assimp-vc143-mt.lib"
}
postbuildcommands {
"{COPYFILE} vendor/SDL/BUILD/Release/SDL3.dll %{cfg.targetdir}/",
"{COPYFILE} vendor/glew/bin/Release/x64/glew32.dll %{cfg.targetdir}/",
"{COPYFILE} vendor/assimp/BUILD/bin/Release/assimp-vc143-mt.dll %{cfg.targetdir}/",
[[xcopy /Q /E /Y /I /S /D assets ]] .. [[..\bin\]] .. outputdir .. [[\%{prj.name}\]]
}
filter "system:windows"
cppdialect "C++17"
systemversion "latest"
filter "configurations:Debug"
symbols "On"
kind "ConsoleApp"
debugdir "%{prj.name}/assets/"
filter "configurations:Release"
optimize "On"
debugdir "%{prj.name}/assets/"
kind "WindowedApp"
entrypoint "mainCRTStartup"
defines {
-- if any needed, add here.
}