-
Notifications
You must be signed in to change notification settings - Fork 6
/
premake5.lua
133 lines (111 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
if _ACTION:match("vs*") then
require "pmk/extensions/premake-qt/qt"
elseif _ACTION == "qmake" then
require "pmk/extensions/premake-qmake/qmake"
end
local qtdir_x86 = io.readfile("tmp/.qtdir_x86")
local qtdir_x64 = io.readfile("tmp/.qtdir_x64")
workspace "UmikoBot"
location "sln/"
configurations {
"Debug",
"Release",
}
platforms {
"x86",
"x64",
}
project "UmikoBot"
location "sln/prj/"
kind "ConsoleApp"
cppdialect "C++11"
files {
"src/**.cpp",
"src/**.h",
"src/**.qrc",
"src/**.ui",
}
flags {
"MultiProcessorCompile",
}
includedirs {
"src/",
"dep/QDiscord/src/core/",
}
links {
"QDiscordCore",
}
qtmodules {
"core",
"gui",
"network",
"websockets",
"widgets",
}
filter {"configurations:Release"}
optimize "Full"
defines {
"QT_NO_DEBUG",
}
filter {"platforms:x86"}
debugdir "res/"
objdir "obj/x86/"
targetdir "bin/x86/"
filter {"platforms:x64"}
debugdir "res/"
objdir "obj/x64/"
targetdir "bin/x64/"
filter {"toolset:msc"}
disablewarnings { "C4996" }
filter {}
-- Enable premake-qt when targeting Visual Studio
if _ACTION:match("vs*") then
premake.extensions.qt.enable()
qtprefix "Qt5"
qtgenerateddir "src/GeneratedFiles/"
filter {"configurations:Debug"}
qtsuffix "d"
filter {"platforms:x86"}
qtpath (qtdir_x86)
filter {"platforms:x64"}
qtpath (qtdir_x64)
end
group "QDiscord"
project "QDiscordCore"
location "sln/prj/"
kind "StaticLib"
cppdialect "C++11"
files {
"dep/QDiscord/src/core/**.h",
"dep/QDiscord/src/core/**.cpp",
}
flags {
"MultiProcessorCompile",
}
includedirs {
"dep/QDiscord/src/core/",
}
filter {"configurations:Release"}
optimize "Full"
defines {
"QT_NO_DEBUG",
}
filter {"platforms:x86"}
objdir "obj/x86/"
targetdir "bin/x86/"
filter {"platforms:x64"}
objdir "obj/x64/"
targetdir "bin/x64/"
filter {}
-- Enable premake-qt when targeting Visual Studio
if _ACTION:match("vs*") then
premake.extensions.qt.enable()
qtprefix "Qt5"
qtgenerateddir "dep/QDiscord/src/core/GeneratedFiles/"
filter {"configurations:Debug"}
qtsuffix "d"
filter {"platforms:x86"}
qtpath (qtdir_x86)
filter {"platforms:x64"}
qtpath (qtdir_x64)
end