1
0
mirror of https://codeberg.org/vyivel/dulcepan/ synced 2025-03-12 18:59:15 +02:00
dulcepan/meson.build

95 lines
1.6 KiB
Meson
Raw Normal View History

2024-06-17 23:52:13 +03:00
project(
'dulcepan',
'c',
2025-03-08 22:56:40 +03:00
version: '1.0.3',
2024-06-17 23:52:13 +03:00
license: 'GPL-3.0-only',
default_options: [
'c_std=c11',
'warning_level=3',
],
)
add_project_arguments(
[
'-D_POSIX_C_SOURCE=200809L',
],
language: 'c',
)
cc = meson.get_compiler('c')
2024-06-18 08:50:45 +03:00
big_endian = target_machine.endian() == 'big'
2024-06-17 23:52:13 +03:00
add_project_arguments(cc.get_supported_arguments([
'-Wconversion',
'-Wendif-labels',
'-Wimplicit-fallthrough=2',
'-Wlogical-op',
'-Wmissing-include-dirs',
'-Wmissing-prototypes',
'-Wold-style-definition',
'-Wpointer-arith',
'-Woverflow',
'-Wshadow',
'-Wstrict-aliasing=2',
'-Wstrict-prototypes',
'-Wundef',
'-Wno-unused-parameter',
2024-06-18 08:50:45 +03:00
'-DDP_BIG_ENDIAN=@0@'.format(big_endian.to_int()),
2024-06-17 23:52:13 +03:00
]), language: 'c')
2024-06-24 13:48:05 +03:00
m = cc.find_library('m')
2024-06-17 23:52:13 +03:00
wayland_client = dependency('wayland-client')
wayland_protos = dependency('wayland-protocols')
cairo = dependency('cairo')
2024-06-18 08:50:45 +03:00
pixman = dependency('pixman-1')
spng = dependency('spng', fallback: 'libspng')
2024-06-19 18:40:22 +03:00
xkbcommon = dependency(
'xkbcommon',
fallback: 'libxkbcommon',
default_options: [
'enable-tools=false',
'enable-x11=false',
'enable-docs=false',
'enable-xkbregistry=false',
],
)
2024-06-17 23:52:13 +03:00
2024-06-19 18:40:22 +03:00
sfdo_basedir = dependency(
'libsfdo-basedir',
version: '>=0.1.0',
fallback: 'libsfdo',
default_options: [
'default_library=static',
'examples=false',
],
2024-06-17 23:52:13 +03:00
)
2024-06-19 18:40:22 +03:00
subdir('protocols')
subdir('src')
2024-06-17 23:52:13 +03:00
executable(
meson.project_name(),
src,
dependencies: [
client_protos,
2024-06-24 13:48:05 +03:00
m,
2024-06-17 23:52:13 +03:00
wayland_client,
cairo,
2024-06-18 08:50:45 +03:00
pixman,
2024-06-19 18:40:22 +03:00
spng,
2024-06-17 23:52:13 +03:00
xkbcommon,
2024-06-19 18:40:22 +03:00
sfdo_basedir,
2024-06-17 23:52:13 +03:00
],
install: true,
)
2024-07-02 21:15:09 +03:00
install_data(
'dulcepan.cfg',
install_dir: join_paths(get_option('sysconfdir'), 'xdg'),
)