wlvncc/meson.build

84 lines
1.4 KiB
Meson
Raw Normal View History

project(
'wlvncc',
'c',
version: '0.1.0',
license: 'ISC',
default_options: [
'c_std=gnu11',
],
)
buildtype = get_option('buildtype')
host_system = host_machine.system()
prefix = get_option('prefix')
c_args = [
'-D_GNU_SOURCE',
]
if buildtype != 'debug' and buildtype != 'debugoptimized'
c_args += '-DNDEBUG'
endif
add_project_arguments(c_args, language: 'c')
cc = meson.get_compiler('c')
libm = cc.find_library('m', required: false)
librt = cc.find_library('rt', required: false)
2020-07-10 14:26:27 +00:00
xkbcommon = dependency('xkbcommon')
wayland_client = dependency('wayland-client')
2020-07-10 00:14:29 +00:00
libvncclient = dependency('libvncclient')
aml_project = subproject('aml', required: false)
if aml_project.found()
aml = aml_project.get_variable('aml_dep')
else
aml = dependency('aml')
endif
inc = include_directories('include')
subdir('protocols')
sources = [
'src/main.c',
2020-07-09 20:58:45 +00:00
'src/shm.c',
2020-07-10 10:45:10 +00:00
'src/seat.c',
2020-07-10 12:58:29 +00:00
'src/pointer.c',
2020-07-10 14:26:27 +00:00
'src/keyboard.c',
2020-07-10 10:45:10 +00:00
'src/strlcpy.c',
]
dependencies = [
libm,
librt,
2020-07-10 14:26:27 +00:00
xkbcommon,
aml,
wayland_client,
2020-07-10 00:14:29 +00:00
libvncclient,
client_protos,
]
config = configuration_data()
config.set('PREFIX', '"' + prefix + '"')
if host_system == 'linux' and cc.has_header('sys/sdt.h')
config.set('HAVE_USDT', true)
endif
configure_file(
output: 'config.h',
configuration: config,
)
executable(
'wvncc',
sources,
dependencies: dependencies,
include_directories: inc,
install: true,
)