summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2026-04-13 16:16:25 -0400
committerAndrew Opalach <andrew@akon.city> 2026-04-13 16:38:55 -0400
commit9913b7d590f46e59a475abbe85e70e02979d8d37 (patch)
tree4cda8e52b89775bbeb082216f34d030d58161532 /meson.build
parentd13e92193d21e112f45f3c92cf159f27498a3a55 (diff)
downloadstela-9913b7d590f46e59a475abbe85e70e02979d8d37.tar.gz
stela-9913b7d590f46e59a475abbe85e70e02979d8d37.tar.bz2
stela-9913b7d590f46e59a475abbe85e70e02979d8d37.zip
Adjust window api, cleanup and update deps
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build24
1 files changed, 20 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 2070cda..af738aa 100644
--- a/meson.build
+++ b/meson.build
@@ -94,6 +94,9 @@ elif get_option('api') in ['gl', 'gles']
stela_src += ['src/gl_common.c']
stela_args += ['-DSTELA_API_OPENGL']
elif get_option('api') == 'vulkan'
+ if not compiler.has_header('vulkan/vulkan.h')
+ error('Vulkan headers not found.')
+ endif
vulkan = dependency('vulkan')
vulkan_headers = vulkan.partial_dependency(includes: true, compile_args: true, link_args: true)
stela_src += ['src/vk_common.c']
@@ -114,9 +117,15 @@ if get_option('window') == 'x11'
stela_deps += [x11, xext, xrandr, xfixes, xcursor, xkb]
stela_args += ['-DSTELA_WINDOW_X11']
elif get_option('window') == 'wayland'
- wl_client = dependency('wayland-client')
- wl_cursor = dependency('wayland-cursor')
- wl_egl = dependency('wayland-egl')
+ wl_client = dependency('wayland-client', default_options: [
+ 'libraries=true',
+ 'scanner=false',
+ 'tests=false',
+ 'documentation=false',
+ 'dtd_validation=false'
+ ], required: false, allow_fallback: false)
+ wl_cursor = dependency('wayland-cursor', allow_fallback: false)
+ wl_egl = dependency('wayland-egl', allow_fallback: false)
wl_protocols = dependency('wayland-protocols', version: '>=1.32', required: false, allow_fallback: false)
if not wl_protocols.found()
wl_protocols_datadir = subproject('wayland-protocols', default_options: [
@@ -131,7 +140,7 @@ elif get_option('window') == 'wayland'
else
wlr_protocols_datadir = wlr_protocols.get_variable(pkgconfig: 'pkgdatadir')
endif
- scanner = find_program('wayland-scanner')
+ scanner = find_program('wayland-scanner', native: true)
scanner_private_code = generator(scanner, output: '@BASENAME@-protocol.c',
arguments: ['private-code','@INPUT@', '@OUTPUT@'])
scanner_client_header = generator(scanner, output: '@BASENAME@-client-protocol.h',
@@ -145,6 +154,8 @@ elif get_option('window') == 'wayland'
wl_protocols_datadir + '/unstable/tablet/tablet-unstable-v2.xml'),
scanner_private_code.process(
wl_protocols_datadir + '/staging/cursor-shape/cursor-shape-v1.xml'),
+ scanner_private_code.process(
+ wl_protocols_datadir + '/staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml'),
#scanner_private_code.process(
# wl_protocols_datadir + '/unstable/xdg-output/xdg-output-unstable-v1.xml'),
scanner_private_code.process(
@@ -163,6 +174,8 @@ elif get_option('window') == 'wayland'
wl_protocols_datadir + '/unstable/tablet/tablet-unstable-v2.xml'),
scanner_client_header.process(
wl_protocols_datadir + '/staging/cursor-shape/cursor-shape-v1.xml'),
+ scanner_client_header.process(
+ wl_protocols_datadir + '/staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml'),
#scanner_client_header.process(
# wl_protocols_datadir + '/unstable/xdg-output/xdg-output-unstable-v1.xml'),
scanner_client_header.process(
@@ -180,6 +193,9 @@ elif get_option('window') == 'wayland'
stela_args += ['-DSTELA_WINDOW_WAYLAND']
elif get_option('window') == 'win32'
stela_src += ['src/window_win32.c']
+ if not get_option('win32-compat')
+ stela_deps += [compiler.find_library('dwmapi')]
+ endif
stela_args += ['-DSTELA_WINDOW_WIN32']
elif get_option('window') == 'glfw'
glfw3 = dependency('glfw3', required: false, allow_fallback: false)