-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.lua
65 lines (53 loc) · 1.58 KB
/
project.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
printf ("Premake generation started...")
LANG = "C"
BIN_DIR = path.join(_MAIN_SCRIPT_DIR, ".bin/%{cfg.buildcfg}")
LIB_DIR = path.join(_MAIN_SCRIPT_DIR, ".lib/%{cfg.buildcfg}")
PROJECTS_DIR = path.join(_MAIN_SCRIPT_DIR, ".projects/")
function configuration_settings()
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
end
function system_settings()
filter {"system:windows", "action:vs*"}
systemversion("latest")
end
function static_lib_header()
kind "StaticLib"
language (LANG)
targetdir (LIB_DIR)
defines { "LIBRARY_EXPORTS" }
configuration_settings()
system_settings()
end
function shared_lib_header()
kind "SharedLib"
language (LANG)
targetdir (BIN_DIR)
defines { "LIBRARY_EXPORTS" }
configuration_settings()
system_settings()
end
function console_app_header(project_name)
printf ("[" .. project_name .. "] generating...")
location(path.join(PROJECTS_DIR, project_name))
kind "ConsoleApp"
language (LANG)
targetdir (BIN_DIR)
libdirs {LIB_DIR}
configuration_settings()
system_settings()
end
workspace "project"
objdir ".obj/%{cfg.buildcfg}"
configurations { "Debug", "Release" }
architecture "x86_64"
include("0_tutorial_cubemap/0_tutorial_cubemap.lua")
include("1_tutorial_vk_glslang/1_tutorial_vk_glslang.lua")
include("2_tutorial_gl_camera/2_tutorial_gl_camera.lua")
include("3_tutorial_vk_camera/3_tutorial_vk_camera.lua")
include("tests/tests.lua")
printf ("Generation finished.")