forked from hhyyrylainen/Leviathan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LeviathanLibraries.rb
170 lines (138 loc) · 4.29 KB
/
LeviathanLibraries.rb
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# Libraries used by leviathan
require 'os'
require_relative 'RubySetupSystem/Libraries/SetupNewton.rb'
require_relative 'RubySetupSystem/Libraries/SetupAngelScript.rb'
require_relative 'RubySetupSystem/Libraries/SetupSFML.rb'
require_relative 'RubySetupSystem/Libraries/SetupOgre.rb'
require_relative 'RubySetupSystem/Libraries/SetupCEGUI.rb'
require_relative 'RubySetupSystem/Libraries/SetupFFMPEG.rb'
require_relative 'RubySetupSystem/Libraries/SetupcAudio.rb'
if OS.windows?
require_relative 'RubySetupSystem/Libraries/SetupFreeType.rb'
require_relative 'RubySetupSystem/Libraries/SetupZLib.rb'
require_relative 'RubySetupSystem/Libraries/SetupFreeImage.rb'
require_relative 'RubySetupSystem/Libraries/SetupSDL.rb'
require_relative 'RubySetupSystem/Libraries/SetupOpenALSoft.rb'
end
require_relative 'RubySetupSystem/Libraries/SetupLeviathan.rb'
# Setup dependencies settings
THIRD_PARTY_INSTALL = File.join(ProjectDir, "build", "ThirdParty")
$newton = Newton.new(
version: "6d9be8ccce94845d8738244f5fd9da19c53886ca",
installPath: THIRD_PARTY_INSTALL,
noInstallSudo: true,
disableDemos: true,
fork: "https://github.com/hhyyrylainen/newton-dynamics.git"
)
$angelscript = AngelScript.new(
version: "2.32.0",
installPath: THIRD_PARTY_INSTALL,
noInstallSudo: true
)
$sfml = SFML.new(
version: "2.4.x",
installPath: THIRD_PARTY_INSTALL,
noInstallSudo: true
)
$ffmpeg = FFMPEG.new(
version: "release/3.3",
installPath: THIRD_PARTY_INSTALL,
noInstallSudo: true,
enablePIC: true,
buildShared: true,
enableSmall: true,
# noStrip: true,
extraOptions: [
"--disable-postproc", "--disable-avdevice",
"--disable-avfilter",
if !OS.windows? then
"--enable-rpath"
else
""
end,
"--disable-network",
# Can't be bothered to check which specific things we need so some of these disables
# are disabled
#"--disable-everything",
#"--disable-demuxers",
"--disable-encoders",
"--disable-decoders",
#"--disable-hwaccels",
"--disable-muxers",
#"--disable-parsers",
#"--disable-protocols",
"--disable-indevs",
"--disable-outdevs",
"--disable-filters",
# Wanted things
# These aren't enough so all the demuxers protocols and parsers are enabled
# "--enable-decoder=aac", "--enable-decoder=mpeg4", "--enable-decoder=h264",
# "--enable-parser=h264", "--enable-parser=aac", "--enable-parser=mpeg4video",
# "--enable-demuxer=h264", "--enable-demuxer=aac", "--enable-demuxer=m4v",
"--enable-decoder=vorbis",
"--enable-decoder=opus",
"--enable-decoder=vp9",
# Disable all the external libraries
"--disable-bzlib", "--disable-iconv",
"--disable-libxcb",
"--disable-lzma", "--disable-sdl2", "--disable-xlib", "--disable-zlib",
"--disable-audiotoolbox", "--disable-cuda", "--disable-cuvid",
"--disable-nvenc", "--disable-vaapi", "--disable-vdpau",
"--disable-videotoolbox"
].flatten
)
$ogre = Ogre.new(
version: "v2-1",
installPath: THIRD_PARTY_INSTALL,
noInstallSudo: true
)
$cegui = CEGUI.new(
version: "7f1ec2e2266e",
installPath: THIRD_PARTY_INSTALL,
# Find Ogre in our search path
extraOptions: ["-DOGRE_HOME=#{THIRD_PARTY_INSTALL}"],
noInstallSudo: true
)
$caudio = CAudio.new(
version: "master",
installPath: THIRD_PARTY_INSTALL,
noInstallSudo: true,
noTutorials: true
)
$leviathanSelfLib = Leviathan.new({})
if OS.windows?
$freetype = FreeType.new(
installPath: THIRD_PARTY_INSTALL,
noInstallSudo: true
)
$zlib = ZLib.new(
installPath: THIRD_PARTY_INSTALL,
noInstallSudo: true,
)
$freeimage = FreeImage.new(
installPath: THIRD_PARTY_INSTALL,
noInstallSudo: true,
version: "master"
)
$sdl = SDL.new(
installPath: THIRD_PARTY_INSTALL,
noInstallSudo: true,
version: "release-2.0.6"
)
$openalsoft = OpenALSoft.new(
installPath: THIRD_PARTY_INSTALL,
noInstallSudo: true,
version: "master"
)
end
$leviathanLibList =
[$newton, $angelscript, $sfml, $ffmpeg]
# This if for testing one single dependency compiling
#$leviathanLibList = [$ffmpeg]
#$leviathanLibList = []
# Ogre windows deps and other windows only deps
# sdl is also used by Leviathan directly
if OS.windows?
$leviathanLibList += [$zlib, $freeimage, $sdl, $freetype, $openalsoft]
end
$leviathanLibList += [$caudio, $ogre, $cegui]