-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake5.lua
56 lines (47 loc) · 1.22 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
workspace("Deben")
-- Configuration.
configurations({ "Release", "Dev"})
location("build")
targetdir ("build/%{prj.name}/%{cfg.longname}")
debugdir ("build/%{prj.name}/%{cfg.longname}")
architecture("x64")
-- Configuration specific settings.
filter("configurations:Release")
defines({ "NDEBUG" })
optimize("On")
filter("configurations:Dev")
defines({ "DEBUG" })
symbols("On")
filter({})
startproject("Deben")
project("Deben")
kind("ConsoleApp")
language("C++")
cppdialect("C++17")
systemversion("latest")
-- Compiler flags
filter("toolset:not msc*")
buildoptions({ "-Wall", "-Wextra" })
filter("toolset:msc*")
buildoptions({ "-W3"})
filter({})
-- Common include dirs
-- System headers are used to support angled brackets in Xcode.
includedirs({"src/"})
sysincludedirs({ "libs/" })
-- common files
files({"src/**", "libs/**", "premake5.lua"})
removefiles({"**.DS_STORE", "**.thumbs"})
-- visual studio filters
filter("action:vs*")
defines({ "_CRT_SECURE_NO_WARNINGS" })
filter({})
newaction {
trigger = "clean",
description = "Clean the build directory",
execute = function ()
print("Cleaning...")
os.rmdir("./build")
print("Done.")
end
}