-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
49 lines (38 loc) · 1.19 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
newoption {
trigger = "SFML_INSTALL_DIR",
value = "path",
description = "Path to SFML install directory"
}
SFML_INSTALL_DIR = _OPTIONS["SFML_INSTALL_DIR"]
WINDOWS = os.host() == "windows"
LINUX = os.host() == "linux"
if _ACTION and string.startswith(_ACTION, "vs20") and not SFML_INSTALL_DIR then
error("Please specify path to SFML install directory via SFML_INSTALL_DIR")
end
workspace "checkers"
configurations {"Debug", "Release"}
project "checkers"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
targetdir "bin/%{cfg.buildcfg}"
files {"**.hpp", "**.cpp"}
includedirs "include"
if WINDOWS then
includedirs (path.join(SFML_INSTALL_DIR, "include"))
libdirs (path.join(SFML_INSTALL_DIR, "lib"))
elseif LINUX then
links "stdc++fs"
end
filter "configurations:Release"
defines "NDEBUG"
optimize "On"
links {"sfml-audio", "sfml-graphics", "sfml-system", "sfml-window"}
filter "configurations:Debug"
defines "DEBUG"
symbols "On"
if WINDOWS then
links {"sfml-audio-d", "sfml-graphics-d", "sfml-system-d", "sfml-window-d"}
elseif LINUX then
links {"sfml-audio", "sfml-graphics", "sfml-system", "sfml-window"}
end