-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake5.lua
70 lines (48 loc) · 1.43 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
-- worksapce config's
print("\nstart generating workspace")
workspace("ds_workspace")
configurations { "Debug", "Release" }
print("generating workspace done !\n")
-- include external build file
include "tester/tester.lua"
-- function act like template , for generating porject's
function make_project_for_lib(
lib_name , lib_path , lib_type
)
-- check parameters
lib_type = lib_type or "StaticLib"
print("\n[ " .. lib_name .. " ] : generate project ! ")
-- project name
project(lib_name)
-- project path
location(lib_path)
-- seleceted folders
files {
lib_path .. "*.hpp" ,
lib_path .. "*.cpp" ,
lib_path .. "tests/*.cpp",
}
-- ignored files/folders
removefiles {
lib_path .. "*.vcxproj",
lib_path .. "*.vcxproj.filters",
lib_path .. "*.vcxproj.user",
}
-- virtual folders in IDE
vpaths {
[ lib_name .. "/*" ] = lib_path .. "**",
}
-- project type/deatilis
kind(lib_type)
language("C++")
targetdir("bin/%{cfg.buildcfg}")
filter("configurations:Debug")
defines { "DEBUG" }
symbols("On")
filter("configurations:Release")
defines { "NDEBUG" }
optimize("Off")
print( "\n[ " .. lib_name .. " ] : finished !\n" )
end
make_project_for_lib("static_stack" , "stacks/static_stack/")
make_project_for_lib("dynamic_stack" , "stacks/dynamic_stack/")