-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
131 lines (107 loc) · 2.62 KB
/
premake5.lua
File metadata and controls
131 lines (107 loc) · 2.62 KB
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
require "raw"
local PROJECT_PATH = path.getabsolute('.')
local SOURCE_DIR = path.join(PROJECT_PATH,"src")
print("Source: " .. SOURCE_DIR)
local client_parameters = "-c 127.0.0.1:5555"
local server_parameters = "-s servers.txt"
INTERMEDIATE_DIR = path.join(PROJECT_PATH, "intermediate")
BUILD_DIR = path.join(INTERMEDIATE_DIR, "build")
PROJECT_DIR = path.join(INTERMEDIATE_DIR, "projectfiles")
BINARY_DIR = path.join(PROJECT_PATH, "bin/" .. _TARGET_OS)
workspace "workspace"
configurations{ "Debug", "Release" }
architecture("x64")
filter "platforms:Win64"
system "Windows"
filter {}
group("Applications")
local prj = project "boid-simulation"
location(PROJECT_DIR)
kind "ConsoleApp"
language "C++"
objdir(BUILD_DIR .. "/".. prj.name)
targetdir(BINARY_DIR)
debugdir(path.join(PROJECT_PATH,"src/"))
files{
path.join(SOURCE_DIR,"**.cpp"),
path.join(SOURCE_DIR,"**.h")
}
includedirs{
SOURCE_DIR
}
includedirs{
path.join(PROJECT_PATH,"ext/SFML/include")
}
links{
"sfml-audio",
"sfml-graphics",
"sfml-network",
"sfml-system",
"sfml-window"
}
-- Due to weirdness in precompiled headers these have to be specific to compiler
filter "action:not vs*"
pchheader "stdafx.h"
buildoptions{
"-std=c++17"
}
filter "action:vs*"
pchheader "stdafx.h"
pchsource(path.join(SOURCE_DIR , "stdafx.cpp"))
filter{}
filter "configurations:Debug"
symbols "On"
defines { "DEBUG" }
target_name = "boid-simulation-debug"
filter "configurations:Release"
defines{"NDEBUG"}
target_name = "boid-simulation-release"
optimize "On"
filter {"system:windows"}
defines{"WINDOWS"}
defines{"SFML_STATIC"}
links{
"opengl32",
"winmm",
"gdi32",
"ws2_32"
}
-- filter {"system:windows", "configurations:Debug"}
-- links{
-- "sfml-system-s-d",
-- "sfml-graphics-s-d",
-- "sfml-window-s-d",
-- "sfml-main-d",
-- "sfml-network-s-d"
-- }
-- filter {"system:windows", "configurations:Release"}
-- links{
-- "sfml-system-s",
-- "sfml-graphics-s",
-- "sfml-window-s",
-- "sfml-main",
-- "sfml-network-s"
-- }
filter "system:linux"
defines{"LINUX"}
filter {}
targetname(target_name)
group("External")
dofile("ext/SFML.lua")
group("Launchers")
project "client"
location(PROJECT_DIR)
kind "ConsoleApp"
debugdir(SOURCE_DIR)
debugcommand(BINARY_DIR .. "/" .. target_name .. "%{cfg.buildtarget.extension}")
debugargs(client_parameters)
files{}
dependson("boid-simulation")
project "server"
location(PROJECT_DIR)
kind "ConsoleApp"
debugdir(SOURCE_DIR)
debugcommand(BINARY_DIR .. "/" .. target_name .. "%{cfg.buildtarget.extension}")
debugargs(server_parameters)
files{}
dependson("boid-simulation")