From 1403bb843c122816e24072a7de2751db384de17e Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Tue, 7 May 2024 19:23:55 +0200 Subject: [PATCH 1/3] Cleaned meson options --- meson_options.txt | 8 +------- render/fx_renderer/meson.build | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index 1a439a4..8b527ea 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,8 +1,2 @@ -option('xcb-errors', type: 'feature', value: 'auto', description: 'Use xcb-errors util library') -option('xwayland', type: 'feature', value: 'auto', yield: true, description: 'Enable support for X11 applications') option('examples', type: 'boolean', value: true, description: 'Build example applications') -option('icon_directory', description: 'Location used to look for cursors (default: ${datadir}/icons)', type: 'string', value: '') -option('renderers', type: 'array', choices: ['auto', 'gles2', 'vulkan'], value: ['auto'], description: 'Select built-in renderers') -option('backends', type: 'array', choices: ['auto', 'drm', 'libinput', 'x11'], value: ['auto'], description: 'Select built-in backends') -option('allocators', type: 'array', choices: ['auto', 'gbm'], value: ['auto'], - description: 'Select built-in allocators') +option('renderers', type: 'array', choices: ['auto', 'gles2'], value: ['auto'], description: 'Select built-in renderers') diff --git a/render/fx_renderer/meson.build b/render/fx_renderer/meson.build index 041fca7..f8e7b9b 100644 --- a/render/fx_renderer/meson.build +++ b/render/fx_renderer/meson.build @@ -1,6 +1,6 @@ renderers = get_option('renderers') if 'auto' in renderers and get_option('auto_features').enabled() - renderers = ['gles2', 'vulkan'] + renderers = ['gles2'] elif 'auto' in renderers and get_option('auto_features').disabled() renderers = [] endif From 750ec5aa9a0064e9403eac56e043caf34c94299a Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Tue, 7 May 2024 19:24:19 +0200 Subject: [PATCH 2/3] Only look for wlroots subproject if dep isn't found --- meson.build | 18 +++++++++++------- render/fx_renderer/meson.build | 7 +------ types/meson.build | 9 ++------- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/meson.build b/meson.build index 31da09e..0f105e9 100644 --- a/meson.build +++ b/meson.build @@ -92,18 +92,22 @@ wayland_server = dependency('wayland-server', default_options: wayland_project_options, ) -wlroots_options = [ 'examples=false', 'default_library=static' ] +wlroots_options = [ 'examples=false' ] wlroots_version = ['>=0.17.0', '<0.18.0'] -wlroots_is_sub = subproject( - 'wlroots', - default_options: wlroots_options, - required: false, - version: wlroots_version, -).found() wlroots = dependency('wlroots', version: wlroots_version, default_options: wlroots_options, + required: false, ) +if not wlroots.found() + wlroots_proj = subproject( + 'wlroots', + default_options: wlroots_options, + version: wlroots_version, + ) + wlroots = wlroots_proj.get_variable('wlroots') +endif + drm = dependency('libdrm', version: '>=2.4.114', diff --git a/render/fx_renderer/meson.build b/render/fx_renderer/meson.build index f8e7b9b..2765635 100644 --- a/render/fx_renderer/meson.build +++ b/render/fx_renderer/meson.build @@ -6,6 +6,7 @@ elif 'auto' in renderers and get_option('auto_features').disabled() endif wlr_files += files( + 'matrix.c', 'util.c', 'shaders.c', 'pixel_format.c', @@ -16,12 +17,6 @@ wlr_files += files( 'fx_renderer.c', ) -if not wlroots_is_sub - wlr_files += files([ - 'matrix.c', - ]) -endif - if 'gles2' in renderers or 'auto' in renderers egl = dependency('egl', required: 'gles2' in renderers) gbm = dependency('gbm', required: 'gles2' in renderers) diff --git a/types/meson.build b/types/meson.build index 29e9c36..1e0ced2 100644 --- a/types/meson.build +++ b/types/meson.build @@ -1,12 +1,7 @@ wlr_files += files( 'scene/wlr_scene.c', + 'output/wlr_output.c', + 'buffer/buffer.c', ) -if not wlroots_is_sub - wlr_files += files([ - 'output/wlr_output.c', - 'buffer/buffer.c', - ]) -endif - subdir('fx') From 81ccdfec4005573e32a362097fa74d80b7a3011f Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Tue, 7 May 2024 19:34:13 +0200 Subject: [PATCH 3/3] Renamed wlr variables to scenefx ones --- meson.build | 12 ++++++------ protocol/meson.build | 4 ++-- render/fx_renderer/gles2/shaders/meson.build | 2 +- render/fx_renderer/meson.build | 4 ++-- render/meson.build | 2 +- types/fx/meson.build | 2 +- types/meson.build | 2 +- util/meson.build | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index 0f105e9..fadad55 100644 --- a/meson.build +++ b/meson.build @@ -13,7 +13,7 @@ project( # When doing a major or minor release, *always* increase soversion. This isn't # necessary for bugfix releases. Increasing soversion is required because -# wlroots never guarantees ABI stability -- only API stability is guaranteed +# SceneFX never guarantees ABI stability -- only API stability is guaranteed # between minor releases. soversion = 1 @@ -139,8 +139,8 @@ pixman = dependency('pixman-1', math = cc.find_library('m') rt = cc.find_library('rt') -wlr_files = [] -wlr_deps = [ +scenefx_files = [] +scenefx_deps = [ wlroots, wayland_server, drm, @@ -161,9 +161,9 @@ subdir('include') scenefx_inc = include_directories('include') lib_scenefx = library( - meson.project_name(), wlr_files, + meson.project_name(), scenefx_files, soversion: soversion.to_string(), - dependencies: wlr_deps, + dependencies: scenefx_deps, include_directories: [ scenefx_inc ], install: true, ) @@ -171,7 +171,7 @@ lib_scenefx = library( scenefx = declare_dependency( link_with: lib_scenefx, - dependencies: wlr_deps, + dependencies: scenefx_deps, include_directories: scenefx_inc, ) diff --git a/protocol/meson.build b/protocol/meson.build index 4d56bbf..c5b2566 100644 --- a/protocol/meson.build +++ b/protocol/meson.build @@ -68,7 +68,7 @@ foreach name, path : protocols output: '@BASENAME@-protocol.c', command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'], ) - wlr_files += code + scenefx_files += code server_header = custom_target( name.underscorify() + '_server_h', @@ -76,7 +76,7 @@ foreach name, path : protocols output: '@BASENAME@-protocol.h', command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'], ) - wlr_files += server_header + scenefx_files += server_header client_header = custom_target( name.underscorify() + '_client_h', diff --git a/render/fx_renderer/gles2/shaders/meson.build b/render/fx_renderer/gles2/shaders/meson.build index fb83e0c..427fcaf 100644 --- a/render/fx_renderer/gles2/shaders/meson.build +++ b/render/fx_renderer/gles2/shaders/meson.build @@ -16,7 +16,7 @@ shaders = [ foreach name : shaders output = name.underscorify() + '_src.h' var = name.underscorify() + '_src' - wlr_files += custom_target( + scenefx_files += custom_target( output, command: [embed, var], input: name, diff --git a/render/fx_renderer/meson.build b/render/fx_renderer/meson.build index 2765635..624640e 100644 --- a/render/fx_renderer/meson.build +++ b/render/fx_renderer/meson.build @@ -5,7 +5,7 @@ elif 'auto' in renderers and get_option('auto_features').disabled() renderers = [] endif -wlr_files += files( +scenefx_files += files( 'matrix.c', 'util.c', 'shaders.c', @@ -23,7 +23,7 @@ if 'gles2' in renderers or 'auto' in renderers glesv2 = dependency('glesv2', required: 'gles2' in renderers) if egl.found() and gbm.found() and glesv2.found() - wlr_deps += [egl, gbm, glesv2] + scenefx_deps += [egl, gbm, glesv2] endif subdir('gles2') endif diff --git a/render/meson.build b/render/meson.build index 56579ee..c5dd423 100644 --- a/render/meson.build +++ b/render/meson.build @@ -1,4 +1,4 @@ -wlr_files += files( +scenefx_files += files( 'pixel_format.c', 'egl.c', ) diff --git a/types/fx/meson.build b/types/fx/meson.build index 2170f35..3932965 100644 --- a/types/fx/meson.build +++ b/types/fx/meson.build @@ -1,4 +1,4 @@ -wlr_files += files( +scenefx_files += files( 'shadow_data.c', 'blur_data.c', ) diff --git a/types/meson.build b/types/meson.build index 1e0ced2..c0296eb 100644 --- a/types/meson.build +++ b/types/meson.build @@ -1,4 +1,4 @@ -wlr_files += files( +scenefx_files += files( 'scene/wlr_scene.c', 'output/wlr_output.c', 'buffer/buffer.c', diff --git a/util/meson.build b/util/meson.build index b54835c..c81d15c 100644 --- a/util/meson.build +++ b/util/meson.build @@ -1,4 +1,4 @@ -wlr_files += files( +scenefx_files += files( 'array.c', 'env.c', 'time.c',