-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
74 lines (58 loc) · 1.63 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
newoption {
trigger = "skip_viewer",
description = "Do not generate the project for the viewer."
}
workspace("eXplorer112")
-- Configuration.
configurations({ "Release", "Dev"})
location("build")
targetdir ("build/%{prj.name}/%{cfg.longname}")
debugdir ("build/%{prj.name}/%{cfg.longname}")
architecture("x64")
systemversion("latest")
-- Configuration specific settings.
filter("configurations:Release")
defines({ "NDEBUG" })
optimize("On")
filter("configurations:Dev")
defines({ "DEBUG" })
symbols("On")
filter({})
startproject("eXplorer112")
-- Projects
group("Projects")
-- Command line exporter
project("eXporter112")
kind("ConsoleApp")
language("C++")
cppdialect("C++17")
-- Compiler flags
filter("toolset:not msc*")
buildoptions({ "-Wall", "-Wextra", "-Wno-unknown-pragmas" })
filter("toolset:msc*")
buildoptions({ "-W3", "-wd4068"})
filter({})
-- visual studio filters
filter("action:vs*")
defines({ "_CRT_SECURE_NO_WARNINGS" })
filter({})
-- Common include dirs
-- System headers are used to support angled brackets in Xcode.
includedirs({"src/"})
sysincludedirs({ "src/libs" })
-- common files
files({"src/tool/**", "src/core/**", "src/libs/**.hpp", "src/libs/*/*.cpp", "src/libs/**.h", "src/libs/*/*.c", "premake5.lua"})
removefiles({"**.DS_STORE", "**.thumbs"})
-- Optional viewer project
if (not _OPTIONS["skip_viewer"]) then
include("src/app/premake5.lua")
end
newaction {
trigger = "clean",
description = "Clean the build directory",
execute = function ()
print("Cleaning...")
os.rmdir("./build")
print("Done.")
end
}