forked from flight404/Eyeo2012
-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
87 lines (70 loc) · 2.17 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
-- https://github.com/premake/premake-core/wiki
-- require "./premake5/premake-androidmk/androidmk"
-- http://gulu-dev.com/post/2016-04-17-premake-android-mk
local action = _ACTION or ""
solution "Eyeo2012"
configurations { "Debug", "Release" }
language "C++"
location (action)
platforms {"x64"}
configuration "Debug"
optimize "Debug"
defines { "DEBUG" }
symbols "On"
targetsuffix "-d"
configuration "Release"
defines { "NDEBUG" }
optimize "On"
configuration "vs*"
defines {
"_CRT_SECURE_NO_WARNINGS",
"WIN32",
"VK_USE_PLATFORM_WIN32_KHR",
"NOMINMAX",
"_USE_MATH_DEFINES",
}
configuration "x64"
targetdir ("x64")
flags {
"MultiProcessorCompile",
}
staticruntime "On"
includedirs {
"../Cinder/include",
"Common",
"Common/CinderTraer/include",
}
function create_example_project( example_path )
-- leaf_name = string.sub(example_path, string.len("examples/") + 1)
leaf_name = example_path
project (leaf_name)
kind "WindowedApp"
files {
leaf_name .. "/include/**",
leaf_name .. "/src/**",
"Common/**",
}
includedirs {
leaf_name .. "/include",
}
configuration "Debug"
libdirs {
"../Cinder/lib/msw/x64/Debug/v142"
}
links {
"cinder",
}
configuration "Release"
libdirs {
"../Cinder/lib/msw/x64/Release/v142"
}
links {
"cinder",
}
end
local examples = os.matchdirs("*")
for _, example in ipairs(examples) do
if example ~= ".git" and example ~= ".vscode" and example ~= "vs2019" and example ~= "x64" and example ~= "Common" then
create_example_project(example)
end
end