forked from masterheroit/doghook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
98 lines (75 loc) · 2.47 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
require("premake_modules/export-compile-commands")
require("premake_modules/cmake")
workspace "doghook"
configurations { "Debug", "Release" }
platforms { "x32" }
location "premake"
filter "system:windows"
characterset "MBCS"
filter {}
filter "platforms:x32"
architecture "x32"
filter {}
cppdialect "C++17"
filter "system:linux"
toolset "clang"
--toolset "gcc"
filter "system:windows"
toolset "msc-v141"
filter {}
filter "configurations:Debug"
defines { "DEBUG", "_DEBUG" }
optimize "Off"
filter "system:windows"
symbols "Full"
filter "system:linux"
symbols "On"
buildoptions "-g3"
filter ""
runtime "Debug"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "Full"
symbols "Off"
--flags {"LinkTimeOptimization"}
floatingpoint "Fast"
vectorextensions "AVX"
filter {}
require "oxide/import"
project "doghook"
kind "SharedLib"
language "C++"
targetdir "bin/%{cfg.buildcfg}"
filter "system:linux"
pchheader "src/precompiled.hh"
filter "system:windows"
pchheader "precompiled.hh"
filter {}
--[[
filter{"configurations:Debug"}
libdirs{"oxide/bin/Debug/"}
filter{"configurations:Release"}
libdirs{"oxide/bin/Release"}
filter{}
links{"oxide"}
]]--
filter {"system:linux"}
links{"X11", "Xfixes"}
filter {}
includedirs{"oxide/include"}
links{"oxide"}
pchsource "src/precompiled.cc"
includedirs { "src" }
files { "src/**.hh", "src/**.cc" }
filter "system:linux"
prebuildcommands {
"{MKDIR} %{wks.location}/compile_commands/",
"{TOUCH} %{wks.location}/compile_commands/%{cfg.shortname}.json",
"{COPY} %{wks.location}/compile_commands/%{cfg.shortname}.json ../compile_commands.json"
}
filter "system:windows"
prebuildcommands {
"cmd.exe /c \"" .. "{MKDIR} %{wks.location}/compile_commands/",
"cmd.exe /c \"" .. "{TOUCH} %{wks.location}/compile_commands/%{cfg.shortname}.json",
"cmd.exe /c \"" .. "{COPY} %{wks.location}/compile_commands/%{cfg.shortname}.json ../compile_commands.json*"
}