2017-12-12 14:12:07 +00:00
|
|
|
project('scrcpy-app', 'c')
|
|
|
|
|
|
|
|
src = [
|
|
|
|
'src/scrcpy.c',
|
|
|
|
'src/command.c',
|
2017-12-14 10:38:44 +00:00
|
|
|
'src/control.c',
|
|
|
|
'src/controlevent.c',
|
|
|
|
'src/convert.c',
|
2017-12-12 14:12:07 +00:00
|
|
|
'src/decoder.c',
|
|
|
|
'src/frames.c',
|
2017-12-15 16:31:23 +00:00
|
|
|
'src/lockutil.c',
|
2017-12-12 14:12:07 +00:00
|
|
|
'src/netutil.c',
|
|
|
|
'src/screen.c',
|
|
|
|
'src/strutil.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
if host_machine.system() == 'windows'
|
2017-12-14 16:22:43 +00:00
|
|
|
src += [ 'src/sys/win/command.c' ]
|
2017-12-12 14:12:07 +00:00
|
|
|
else
|
2017-12-14 16:22:43 +00:00
|
|
|
src += [ 'src/sys/unix/command.c' ]
|
2017-12-12 14:12:07 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
dependency('libavformat'),
|
|
|
|
dependency('libavcodec'),
|
|
|
|
dependency('libavutil'),
|
|
|
|
dependency('sdl2'),
|
|
|
|
dependency('SDL2_net'),
|
|
|
|
]
|
|
|
|
|
|
|
|
executable('scrcpy', src, dependencies: dependencies)
|
2017-12-14 10:38:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
### TESTS
|
|
|
|
|
|
|
|
tests = [
|
|
|
|
['test_control_event_queue', ['tests/test_control_event_queue.c', 'src/controlevent.c']],
|
|
|
|
]
|
|
|
|
|
|
|
|
src_dir = include_directories('src')
|
|
|
|
|
|
|
|
foreach t : tests
|
|
|
|
exe = executable(t[0], t[1], include_directories: src_dir, dependencies: dependencies)
|
|
|
|
test(t[0], exe)
|
|
|
|
endforeach
|