summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorErik Reider <[email protected]>2024-05-08 11:32:13 +0200
committerGitHub <[email protected]>2024-05-08 11:32:13 +0200
commit1cdb05e9d0256f6b8942a7436b539ad87fbcf366 (patch)
tree96a5ce17c44b4963f3b72e9cc6e8a0d1955638b5 /meson.build
parent0abffbe6def159d72f8f00302d6c8f9f8250f580 (diff)
meson.build spring cleaning (#49)
* Cleaned meson options * Only look for wlroots subproject if dep isn't found * Renamed wlr variables to scenefx ones
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build30
1 files changed, 17 insertions, 13 deletions
diff --git a/meson.build b/meson.build
index 31da09e..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
@@ -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',
@@ -135,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,
@@ -157,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,
)
@@ -167,7 +171,7 @@ lib_scenefx = library(
scenefx = declare_dependency(
link_with: lib_scenefx,
- dependencies: wlr_deps,
+ dependencies: scenefx_deps,
include_directories: scenefx_inc,
)