wayvnc/meson.build

104 lines
1.6 KiB
Meson
Raw Permalink Normal View History

2019-10-12 15:24:57 +00:00
project(
'wayvnc',
'c',
2020-02-21 23:07:50 +00:00
version: '0.1.0',
2019-10-12 15:24:57 +00:00
license: 'ISC',
default_options: [
'c_std=gnu11',
],
)
buildtype = get_option('buildtype')
2020-02-11 21:05:05 +00:00
prefix = get_option('prefix')
c_args = [
2019-10-12 15:24:57 +00:00
'-D_GNU_SOURCE',
]
if buildtype == 'release' or buildtype == 'plain'
c_args += '-DNDEBUG'
endif
add_project_arguments(c_args, language: 'c')
2019-10-12 15:24:57 +00:00
cc = meson.get_compiler('c')
libm = cc.find_library('m', required: false)
2020-03-16 22:01:43 +00:00
librt = cc.find_library('rt', required: false)
2019-10-12 15:24:57 +00:00
pixman = dependency('pixman-1')
egl = dependency('egl')
glesv2 = dependency('glesv2')
2019-12-24 15:54:58 +00:00
xkbcommon = dependency('xkbcommon')
2019-10-12 15:24:57 +00:00
wayland_client = dependency('wayland-client')
neatvnc_project = subproject(
'neatvnc',
required: false,
)
2020-03-16 22:01:43 +00:00
aml_project = subproject('aml', required: false)
if aml_project.found()
aml = aml_project.get_variable('aml_dep')
else
aml = dependency('aml')
endif
2019-10-12 15:24:57 +00:00
if neatvnc_project.found()
neatvnc = neatvnc_project.get_variable('neatvnc_dep')
else
neatvnc = dependency('neatvnc')
endif
inc = include_directories('include')
subdir('protocols')
sources = [
'src/main.c',
'src/render.c',
'src/dmabuf.c',
'src/strlcpy.c',
'src/shm.c',
'src/screencopy.c',
'src/output.c',
2019-12-22 15:41:51 +00:00
'src/pointer.c',
2019-12-24 15:54:58 +00:00
'src/keyboard.c',
2019-12-31 13:55:25 +00:00
'src/seat.c',
'src/smooth.c',
2020-01-18 18:14:17 +00:00
'src/cfg.c',
2020-01-25 13:01:16 +00:00
'src/intset.c',
2019-10-12 15:24:57 +00:00
]
dependencies = [
libm,
2020-03-16 22:01:43 +00:00
librt,
2019-10-12 15:24:57 +00:00
pixman,
2020-03-16 22:01:43 +00:00
aml,
2019-10-12 15:24:57 +00:00
egl,
glesv2,
wayland_client,
neatvnc,
2019-12-24 15:54:58 +00:00
xkbcommon,
2019-10-12 15:24:57 +00:00
client_protos,
]
2020-02-11 21:05:05 +00:00
config = configuration_data()
config.set('PREFIX', '"' + prefix + '"')
configure_file(
output: 'config.h',
configuration: config,
)
install_subdir('shaders', install_dir: 'share/wayvnc')
2019-10-12 15:24:57 +00:00
executable(
'wayvnc',
sources,
dependencies: dependencies,
include_directories: inc,
install: true,
)