-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpremake4.lua
79 lines (65 loc) · 2.3 KB
/
premake4.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
-- See "paths.lua.sample" for instructions on creating the file.
dofile ( "paths.lua" )
-- return a new array containing the concatenation of all of its
-- parameters. Scaler parameters are included in place, and array
-- parameters have their values shallow-copied to the final array.
-- Note that userdata and function values are treated as scalar.
function array_concat(...)
local t = {}
for n = 1,select("#",...) do
local arg = select(n,...)
if type(arg)=="table" then
for _,v in ipairs(arg) do
t[#t+1] = v
end
else
t[#t+1] = arg
end
end
return t
end
INC = array_concat ( SFML_INC, SFML_EXT_INC, "src" )
LIB = array_concat ( SFML_LIB, SFML_EXT_LIB )
LINKS = {}
if os.is("macosx") then
KIND = "WindowedApp"
LINKS = { "sfml-graphics.framework", "sfml-window.framework", "sfml-system.framework", "CoreFoundation.framework", "freetype.framework" }
-- LINKS = { "sfml-graphics-d", "sfml-window-d", "sfml-system-d", "CoreFoundation.framework" }
PLATFORMS = { "x32" }
BUILD_OPTS = "-std=c++11 -stdlib=libc++ -g"
LINK_OPTS = "-stdlib=libc++"
DEFINES = ""
POST_BUILD_CMDS = { "scripts/copy-res-mac.sh" }
elseif os.is("windows") then
KIND = "ConsoleApp"
LINKS = { "sfml-graphics-s-d", "sfml-window-s-d", "sfml-system-s-d", "jpeg", "glew", "freetype", "ws2_32", "gdi32", "opengl32", "winmm" }
PLATFORMS = {}
BUILD_OPTS = "-g"
LINK_OPTS = "-static-libgcc -static-libstdc++"
DEFINES = { "GLEW_STATIC", "SFML_STATIC", "UNICODE" }
POST_BUILD_CMDS = {}
elseif os.is("linux") then
KIND = "ConsoleApp"
LINKS = { "sfml-graphics-d", "sfml-window-d", "sfml-system-d" }
PLATFORMS = {}
BUILD_OPTS = "-g"
LINK_OPTS = ""
DEFINES = { "SFML_STATIC" }
POST_BUILD_CMDS = {}
end
solution "SFMLJoystickTestbed"
configurations { "Debug", "Release" }
project "SFMLJoystickTestbed"
kind(KIND)
language "C++"
files { "**.h", "**.cpp", "**.hpp", "**.c", "**.ttf" }
links(LINKS)
libdirs(LIB)
includedirs(INC)
buildoptions(BUILD_OPTS)
linkoptions(LINK_OPTS)
defines(DEFINES)
platforms(PLATFORMS)
postbuildcommands(POST_BUILD_CMDS)
configuration "Debug"
configuration "Release"