Skip to content

Commit e6ae2d2

Browse files
committed
Revert "fix subprojects being initialized before all global args have been set"
This reverts commit cb080a5.
1 parent cb080a5 commit e6ae2d2

File tree

1 file changed

+31
-32
lines changed

1 file changed

+31
-32
lines changed

meson.build

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@ project('Cortex-Command-Community-Project', ['cpp','c'], subproject_dir: 'extern
44

55
compiler = meson.get_compiler('cpp')
66
deps=[]
7+
if host_machine.system() in ['linux','darwin']
8+
deps = [
9+
dependency(['sdl2']),
10+
dependency('flac'),
11+
dependency('minizip'),
12+
dependency('luajit'),
13+
dependency('threads'),
14+
dependency('liblz4'),
15+
dependency('libpng'),
16+
dependency(['lua', 'lua54', 'lua5.4','lua-5.4', 'lua53', 'lua-5.3', 'lua5.3','lua52', 'lua5.2', 'lua-5.2', 'lua51', 'lua5.1', 'lua-5.1']),
17+
dependency('tbb'),
18+
dependency('gl')
19+
]
20+
if host_machine.system() == 'linux'
21+
deps += dependency('SDL2_image')
22+
endif
23+
elif host_machine.system() == 'windows'
24+
sdl2 = subproject('SDL2-2.26.3')
25+
sdl2_dep = dependency('sdl2')
26+
luajit = subproject('LuaJIT-2.1')
27+
luajit_dep = dependency('luajit')
28+
zlib = subproject('zlib-ng-2.1.3')
29+
zlib_dep = dependency('zlib')
30+
minizip = subproject('minizip-ng-4.0.0')
31+
minizip_dep = dependency('minizip')
32+
libpng = subproject('libpng-1.6.40')
33+
libpng_dep = dependency('libpng')
34+
# Windows Libraries
35+
opengl = compiler.find_library('opengl32')
36+
deps += [sdl2_dep, luajit_dep, zlib_dep, minizip_dep, libpng_dep, opengl]
37+
endif
738

839
elfname = 'CortexCommand'
940
build_rpath = ''
@@ -138,38 +169,6 @@ if get_option('tracy_debuginfod')
138169
endif
139170

140171
#### Platform Common External Libraries ####
141-
if host_machine.system() in ['linux','darwin']
142-
deps = [
143-
dependency(['sdl2']),
144-
dependency('flac'),
145-
dependency('minizip'),
146-
dependency('luajit'),
147-
dependency('threads'),
148-
dependency('liblz4'),
149-
dependency('libpng'),
150-
dependency(['lua', 'lua54', 'lua5.4','lua-5.4', 'lua53', 'lua-5.3', 'lua5.3','lua52', 'lua5.2', 'lua-5.2', 'lua51', 'lua5.1', 'lua-5.1']),
151-
dependency('tbb'),
152-
dependency('gl')
153-
]
154-
if host_machine.system() == 'linux'
155-
deps += dependency('SDL2_image')
156-
endif
157-
elif host_machine.system() == 'windows'
158-
sdl2 = subproject('SDL2-2.26.3')
159-
sdl2_dep = dependency('sdl2')
160-
luajit = subproject('LuaJIT-2.1')
161-
luajit_dep = dependency('luajit')
162-
zlib = subproject('zlib-ng-2.1.3')
163-
zlib_dep = dependency('zlib')
164-
minizip = subproject('minizip-ng-4.0.0')
165-
minizip_dep = dependency('minizip')
166-
libpng = subproject('libpng-1.6.40')
167-
libpng_dep = dependency('libpng')
168-
# Windows Libraries
169-
opengl = compiler.find_library('opengl32')
170-
deps += [sdl2_dep, luajit_dep, zlib_dep, minizip_dep, libpng_dep, opengl]
171-
endif
172-
173172
external_objects = []
174173
external_libs = []
175174
subdir('external')

0 commit comments

Comments
 (0)