-
Notifications
You must be signed in to change notification settings - Fork 63
/
premake5.lua
89 lines (65 loc) · 1.97 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
newoption {
trigger = "with-docs",
description = "Use doxygen to build the docs"
}
newoption {
trigger = "lib-dir",
description = "Specify extra directory to look for libraries in",
value = "DIR"
}
newoption {
trigger = "include-dir",
description = "Specify extra directory to look for headers in",
value = "DIR"
}
workspace "CryptoKernel"
configurations {"Debug", "Release"}
platforms {"Static", "Shared"}
language "C++"
cppdialect "C++14"
includedirs {"src/kernel",
_OPTIONS["include-dir"]}
libdirs {_OPTIONS["lib-dir"]}
symbols "On"
filter {"configurations:Debug"}
optimize "Off"
filter {"configurations:Release"}
optimize "Full"
filter "system:linux"
linkoptions {"-rdynamic"}
cklibs = {"crypto", "sfml-network",
"sfml-system", "leveldb", "jsoncpp", "jsonrpccpp-server",
"jsonrpccpp-client", "jsonrpccpp-common", "microhttpd", "cschnorr", "noiseprotocol"}
linuxLinks = {"pthread", "lua5.3", "curl", "dl", "gcov"}
winLinks = {"lua", "curl", "ws2_32", "shlwapi", "crypt32"}
macLinks = {"lua", "curl"}
function linkSystemSpecific()
filter "system:linux"
links(linuxLinks)
filter "system:windows"
links(winLinks)
filter "system:macosx"
links(macLinks)
end
project "ck"
files {"src/kernel/**.cpp", "src/kernel/**.h", "src/kernel/**.c"}
configuration "with-docs"
postbuildcommands{"doxygen %{wks.location}/doxyfile"}
filter {"platforms:Static"}
kind "StaticLib"
defines {"SFML_STATIC"}
filter {"platforms:Shared"}
kind "SharedLib"
project "ckd"
kind "ConsoleApp"
files {"src/client/**.cpp", "src/client/**.h"}
links {"ck"}
links(cklibs)
linkSystemSpecific()
project "test"
kind "ConsoleApp"
files {"tests/**.cpp", "tests/**.h"}
links {"ck", "cppunit"}
links(cklibs)
postbuildcommands{"%{cfg.linktarget.abspath}"}
linkSystemSpecific()