From f9523aad77b56e68d143b4b03d3df40db5209817 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sun, 7 Jul 2024 05:48:56 +0200 Subject: [PATCH] meson: unbreak build with aquamarine In file included from ../src/protocols/DRMLease.cpp:1: ../src/protocols/DRMLease.hpp:7:10: fatal error: 'drm-lease-v1.hpp' file not found 7 | #include "drm-lease-v1.hpp" | ^~~~~~~~~~~~~~~~~~ In file included from ../src/render/Renderer.cpp:17: ../src/render/../protocols/DRMSyncobj.hpp:6:10: fatal error: 'linux-drm-syncobj-v1.hpp' file not found 6 | #include "linux-drm-syncobj-v1.hpp" | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ld: error: undefined symbol: Aquamarine::CBackend::hasSession() >>> referenced by Renderer.cpp >>> src/Hyprland.p/render_Renderer.cpp.o:(CHyprRenderer::CHyprRenderer()) >>> referenced by KeybindManager.cpp >>> src/Hyprland.p/managers_KeybindManager.cpp.o:(CKeybindManager::handleVT(unsigned int)) >>> referenced by Monitors.cpp >>> src/Hyprland.p/events_Monitors.cpp.o:(Events::listener_monitorFrame(void*, void*)) >>> referenced 8 more times ld: error: undefined symbol: gbm_create_device >>> referenced by OpenGL.cpp >>> src/Hyprland.p/render_OpenGL.cpp.o:(CHyprOpenGLImpl::CHyprOpenGLImpl()) ld: error: undefined symbol: XcursorShapeLoadImage >>> referenced by CursorManager.cpp >>> src/Hyprland.p/managers_CursorManager.cpp.o:(CCursorManager::SXCursorManager::loadTheme(std::__1::basic_string, std::__1::allocator> const&, int)) >>> referenced by CursorManager.cpp >>> src/Hyprland.p/managers_CursorManager.cpp.o:(CCursorManager::SXCursorManager::loadTheme(std::__1::basic_string, std::__1::allocator> const&, int)) >>> referenced by CursorManager.cpp >>> src/Hyprland.p/managers_CursorManager.cpp.o:(CCursorManager::SXCursorManager::loadTheme(std::__1::basic_string, std::__1::allocator> const&, int)) --- meson.build | 11 ++--------- protocols/meson.build | 2 ++ src/meson.build | 5 +++-- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/meson.build b/meson.build index 49c48c6c..b8101f6c 100644 --- a/meson.build +++ b/meson.build @@ -24,8 +24,6 @@ if cpp_compiler.check_header('execinfo.h') add_project_arguments('-DHAS_EXECINFO', language: 'cpp') endif -wlroots = subproject('wlroots-hyprland', default_options: ['examples=false', 'renderers=gles2']) -have_xwlr = wlroots.get_variable('features').get('xwayland') xcb_dep = dependency('xcb', required: get_option('xwayland')) xcb_composite_dep = dependency('xcb-composite', required: get_option('xwayland')) xcb_errors_dep = dependency('xcb-errors', required: get_option('xwayland')) @@ -38,12 +36,7 @@ cmake = import('cmake') udis = cmake.subproject('udis86') udis86 = udis.dependency('libudis86') -if get_option('xwayland').enabled() and not have_xwlr - error('Cannot enable Xwayland in Hyprland: wlroots has been built without Xwayland support') -endif -have_xwayland = xcb_dep.found() and have_xwlr - -if not have_xwayland +if not xcb_dep.found() add_project_arguments('-DNO_XWAYLAND', language: 'cpp') endif @@ -86,5 +79,5 @@ import('pkgconfig').generate( url: 'https://github.com/hyprwm/Hyprland', description: 'Hyprland header files', install_dir: pkg_install_dir, - subdirs: ['', 'hyprland/protocols', 'hyprland', 'hyprland/wlr'], + subdirs: ['', 'hyprland/protocols', 'hyprland'], ) diff --git a/protocols/meson.build b/protocols/meson.build index f4978c23..457c8957 100644 --- a/protocols/meson.build +++ b/protocols/meson.build @@ -66,6 +66,8 @@ new_protocols = [ [wl_protocol_dir, 'staging/xwayland-shell/xwayland-shell-v1.xml'], [wl_protocol_dir, 'stable/viewporter/viewporter.xml'], [wl_protocol_dir, 'stable/linux-dmabuf/linux-dmabuf-v1.xml'], + [wl_protocol_dir, 'staging/drm-lease/drm-lease-v1.xml'], + [wl_protocol_dir, 'staging/linux-drm-syncobj/linux-drm-syncobj-v1.xml'], ] wl_protos_src = [] diff --git a/src/meson.build b/src/meson.build index ccb1922a..f75eb4e5 100644 --- a/src/meson.build +++ b/src/meson.build @@ -2,14 +2,15 @@ globber = run_command('sh', '-c', 'find . -name "*.cpp" | sort', check: true) src = globber.stdout().strip().split('\n') executable('Hyprland', src, - cpp_args: ['-DWLR_USE_UNSTABLE'], link_args: '-rdynamic', cpp_pch: 'pch/pch.hpp', dependencies: [ server_protos, + dependency('aquamarine'), + dependency('gbm'), + dependency('xcursor'), dependency('wayland-server'), dependency('wayland-client'), - wlroots.get_variable('wlroots'), dependency('cairo'), dependency('hyprcursor'), dependency('hyprlang', version: '>= 0.3.2'),