summaryrefslogtreecommitdiff
path: root/meson.build
blob: 2e4ee931b8c50ad89263dc45b59e8136596820ca (plain)
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
project('camlet',
	'c',
	default_options: [
		'warning_level=3',
	]
)
cc = meson.get_compiler('c')
v4l2 = dependency('libv4l2')
sdl2 = dependency('SDL2')
sdl2_ttf = dependency('SDL2_ttf')
udev = dependency('libudev')
gl = dependency('GL')
sodium = dependency('libsodium')
fontconfig = dependency('fontconfig')
jpeg = dependency('libjpeg')
ogg = dependency('ogg')
vorbis = dependency('vorbis')
vorbisenc = dependency('vorbisenc')
vpx = dependency('vpx')

m_dep = cc.find_library('m', required: false)
if m_dep.found()
	add_project_link_arguments('-lm', language: 'c')
endif
if get_option('debug')
	debug_def = '-DDEBUG=1'
else
	debug_def = '-DDEBUG=0'
endif
executable('camlet', 'main.c', 'camera.c', 'video.c', 'log.c', 'camlet_icon.c', '3rd_party/stb_image_write.c',
	dependencies: [v4l2, sdl2, sdl2_ttf, gl, udev, sodium, fontconfig, jpeg, ogg, vorbis, vorbisenc, vpx],
	c_args: ['-Wno-unused-function', '-Wno-format-truncation', '-Wshadow', debug_def])