Skip to content

Commit 2c322ad

Browse files
committed
move dependencies, fix deps overriding previous dependency declarations
1 parent e6ae2d2 commit 2c322ad

File tree

1 file changed

+36
-35
lines changed

1 file changed

+36
-35
lines changed

meson.build

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,6 @@ 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
387

398
elfname = 'CortexCommand'
409
build_rpath = ''
@@ -71,10 +40,6 @@ if compiler.get_argument_syntax()== 'gcc' # used for gcc compatible compilers
7140
link_args += ['-Wl,--enable-new-dtags'] # Set RUNPATH instead of RPATH
7241
endif
7342

74-
if host_machine.system()=='darwin'
75-
deps += dependency('appleframeworks', modules: ['foundation'])
76-
endif
77-
7843
# Set preprocessor flags and cpp arguments according to build options
7944
buildtype_debug = get_option('debug')
8045
if buildtype_debug
@@ -169,6 +134,42 @@ if get_option('tracy_debuginfod')
169134
endif
170135

171136
#### Platform Common External Libraries ####
137+
if host_machine.system() in ['linux','darwin']
138+
deps += [
139+
dependency(['sdl2']),
140+
dependency('flac'),
141+
dependency('minizip'),
142+
dependency('luajit'),
143+
dependency('threads'),
144+
dependency('liblz4'),
145+
dependency('libpng'),
146+
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']),
147+
dependency('tbb'),
148+
dependency('gl')
149+
]
150+
if host_machine.system() == 'linux'
151+
deps += dependency('SDL2_image')
152+
endif
153+
if host_machine.system()=='darwin'
154+
deps += dependency('appleframeworks', modules: ['foundation'])
155+
endif
156+
elif host_machine.system() == 'windows'
157+
sdl2 = subproject('SDL2-2.26.3')
158+
sdl2_dep = dependency('sdl2')
159+
luajit = subproject('LuaJIT-2.1')
160+
luajit_dep = dependency('luajit')
161+
zlib = subproject('zlib-ng-2.1.3')
162+
zlib_dep = dependency('zlib')
163+
minizip = subproject('minizip-ng-4.0.0')
164+
minizip_dep = dependency('minizip')
165+
libpng = subproject('libpng-1.6.40')
166+
libpng_dep = dependency('libpng')
167+
# Windows Libraries
168+
opengl = compiler.find_library('opengl32')
169+
deps += [sdl2_dep, luajit_dep, zlib_dep, minizip_dep, libpng_dep, opengl]
170+
endif
171+
172+
172173
external_objects = []
173174
external_libs = []
174175
subdir('external')

0 commit comments

Comments
 (0)