-
Notifications
You must be signed in to change notification settings - Fork 4
/
meson.build
44 lines (36 loc) · 1.34 KB
/
meson.build
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
project('raymario', 'c', version: '1.0',
meson_version: '>= 0.39.1')
cc = meson.get_compiler('c')
# find dependencies
glfw_dep = dependency('glfw3')
gl_dep = dependency('gl')
openal_dep = dependency('openal')
m_dep = cc.find_library('m', required : false)
raylib_dep = cc.find_library('raylib', required : false)
prefix = get_option('prefix')
conf = configuration_data()
conf.set('VERSION', '"' + meson.project_version() + '"',
description : 'Version of raymario')
conf.set('PREFIX', prefix,
description : 'Installation prefix')
conf.set('RESOURCE_DIR', '"' + prefix + '/share/raymario/resources"',
description : 'Resource directory contains fonts, images, sounds, maps. Resource files will be installed in $PREFIX/share/raymario/resources')
config_h = configure_file(output : 'config.h', configuration : conf)
source_c = [
'src/main.c',
'src/level.c',
'src/screens/title_screen.c',
'src/screens/loading_screen.c',
'src/screens/gameplay_screen.c',
'src/screens/win_screen.c',
'src/screens/end_screen.c',
'src/libraries/physac.c',
config_h
]
# build executable
raymario = executable('raymario',
source_c,
dependencies : [ raylib_dep, glfw_dep, gl_dep, openal_dep, m_dep ],
install : true)
# install resources directory to prefix/share/raymario
install_subdir('resources', install_dir : 'share/raymario')