summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Reider <[email protected]>2024-01-06 22:53:32 +0100
committerErik Reider <[email protected]>2024-01-07 22:18:30 +0100
commitcc83f41dbfc12af350c37f46677b82a64df801b8 (patch)
tree4f050bcb1a18179accd390749420d00714664691
parent3bdb35c3d635efcfc1d02da3ed13824409819c9a (diff)
Compile wlroots subproject dep staticly
-rw-r--r--meson.build6
-rw-r--r--render/fx_renderer/meson.build7
-rw-r--r--types/meson.build9
3 files changed, 16 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index 8288a96..31da09e 100644
--- a/meson.build
+++ b/meson.build
@@ -92,14 +92,14 @@ wayland_server = dependency('wayland-server',
default_options: wayland_project_options,
)
-wlroots_options = [ 'examples=false' ]
+wlroots_options = [ 'examples=false', 'default_library=static' ]
wlroots_version = ['>=0.17.0', '<0.18.0']
-subproject(
+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,
diff --git a/render/fx_renderer/meson.build b/render/fx_renderer/meson.build
index d7160a8..10e757b 100644
--- a/render/fx_renderer/meson.build
+++ b/render/fx_renderer/meson.build
@@ -6,7 +6,6 @@ elif 'auto' in renderers and get_option('auto_features').disabled()
endif
wlr_files += files(
- 'matrix.c',
'util.c',
'shaders.c',
'pixel_format.c',
@@ -16,6 +15,12 @@ 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 0527b7c..29e9c36 100644
--- a/types/meson.build
+++ b/types/meson.build
@@ -1,7 +1,12 @@
wlr_files += files(
- 'output/wlr_output.c',
'scene/wlr_scene.c',
- 'buffer/buffer.c',
)
+if not wlroots_is_sub
+ wlr_files += files([
+ 'output/wlr_output.c',
+ 'buffer/buffer.c',
+ ])
+endif
+
subdir('fx')