-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake5.lua
104 lines (82 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
98
99
100
101
102
103
workspace "FlapANN"
architecture "x64"
configurations
{
"Debug",
"Release"
}
filter "configurations:Debug"
defines "_DEBUG"
runtime "Debug"
symbols "On"
filter "configurations:Release"
defines "_RELEASE"
runtime "Release"
optimize "On"
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "FlapANN"
location "FlapANN"
kind "ConsoleApp"
language "C++"
targetdir("bin/" .. outputdir .. "/%{wks.name}")
objdir("bin-int/" .. outputdir .. "/%{wks.name}")
pchheader "pch.h"
pchsource "%{wks.name}/src/pch.cpp"
files
{
-- main source files
"%{wks.name}/src/**.h",
"%{wks.name}/src/**.cpp",
-- vendors
"%{wks.name}/vendor/src/**.cpp",
"%{wks.name}/vendor/src/**.c"
}
includedirs
{
"%{wks.name}/vendor/include",
"%{wks.name}/src"
}
filter "system:windows"
cppdialect "C++17"
systemversion "latest"
defines
{
"SFML_STATIC",
}
libdirs
{
"%{wks.name}/vendor/lib/imgui/windows",
"%{wks.name}/vendor/lib/imgui-sfml/windows",
"%{wks.name}/vendor/lib/SFML/windows",
"%{wks.name}/vendor/lib/fann/windows"
}
links
{
-- SFML
"opengl32",
"freetype",
"winmm",
"gdi32",
"openal32",
"flac",
"vorbisenc",
"vorbisfile",
"vorbis",
"ogg",
-- FANN
"fann"
}
postbuildcommands
{
('{COPYFILE} ../%{wks.name}/vendor/lib/SFML/windows/openal32.dll %{cfg.buildtarget.bundlepath}'),
('{COPYFILE} ../%{wks.name}/vendor/lib/fann/windows/fann.dll %{cfg.buildtarget.bundlepath}'),
('{COPYDIR} ../%{wks.name}/resources %{cfg.buildtarget.bundlepath}/resources')
}
filter {"configurations:Debug", "system:windows"}
links { "sfml-audio-s-d", "sfml-graphics-s-d", "sfml-network-s-d", "sfml-system-s-d", "sfml-window-s-d" }
filter {"configurations:Release", "system:windows"}
links { "sfml-audio-s", "sfml-graphics-s", "sfml-network-s", "sfml-system-s", "sfml-window-s" }
filter "files:**.c"
flags {"NoPCH"}
filter "files:FlapANN/vendor/src/**.cpp"
flags {"NoPCH"}