summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2021-04-27 10:02:00 +0300
committerRan Benita <ran@unusedvar.com>2021-04-27 10:02:54 +0300
commit8ff0232bda91e23b140556293050cceca3ffb2b4 (patch)
treecc8364caa8b60eea1ba29695e98d721cdef0977c
parent4238417ba05152dfada978a4b7f9f7f7e12acd47 (diff)
downloadlibxkbcommon-8ff0232bda91e23b140556293050cceca3ffb2b4.tar.gz
libxkbcommon-8ff0232bda91e23b140556293050cceca3ffb2b4.tar.bz2
libxkbcommon-8ff0232bda91e23b140556293050cceca3ffb2b4.zip
build: move the subproject variables to a common section at the end
As suggested in: https://github.com/xkbcommon/libxkbcommon/pull/240#discussion_r620784021 Signed-off-by: Ran Benita <ran@unusedvar.com>
-rw-r--r--meson.build26
1 files changed, 17 insertions, 9 deletions
diff --git a/meson.build b/meson.build
index 50f47d1..c04dc13 100644
--- a/meson.build
+++ b/meson.build
@@ -265,8 +265,7 @@ install_headers(
subdir: 'xkbcommon',
)
-# This variable may be used to build as a subproject and should not be renamed.
-libxkbcommon_dep = declare_dependency(
+dep_libxkbcommon = declare_dependency(
link_with: libxkbcommon,
include_directories: include_directories('.'),
)
@@ -334,8 +333,7 @@ You can disable X11 support with -Denable-x11=false.''')
'xkbcommon/xkbcommon-x11.h',
subdir: 'xkbcommon',
)
- # This variable may be used to build as a subproject and should not be renamed.
- libxkbcommon_x11_dep = declare_dependency(
+ dep_libxkbcommon_x11 = declare_dependency(
link_with: libxkbcommon_x11,
include_directories: include_directories('.'),
)
@@ -399,8 +397,7 @@ if get_option('enable-xkbregistry')
description: 'XKB API to query available rules, models, layouts, variants and options',
)
- # This variable may be used to build as a subproject and should not be renamed.
- libxkbregistry_dep = declare_dependency(
+ dep_libxkbregistry = declare_dependency(
include_directories: include_directories('.'),
link_with: libxkbregistry
)
@@ -415,7 +412,7 @@ if build_tools
'tools-internal',
'tools/tools-common.h',
'tools/tools-common.c',
- dependencies: libxkbcommon_dep,
+ dependencies: dep_libxkbcommon,
)
tools_dep = declare_dependency(
include_directories: [include_directories('tools')],
@@ -514,7 +511,7 @@ You can disable the Wayland xkbcli programs with -Denable-wayland=false.''')
configh_data.set10('HAVE_XKBCLI_LIST', true)
executable('xkbcli-list',
'tools/registry-list.c',
- dependencies: libxkbregistry_dep,
+ dependencies: dep_libxkbregistry,
install: true,
install_dir: dir_libexec)
install_man('tools/xkbcli-list.1')
@@ -685,7 +682,7 @@ if get_option('enable-xkbregistry')
'registry',
executable('test-registry', 'test/registry.c',
include_directories: include_directories('src'),
- dependencies: libxkbregistry_dep),
+ dependencies: dep_libxkbregistry),
env: test_env,
)
endif
@@ -810,3 +807,14 @@ You can disable the documentation with -Denable-docs=false.''')
endif
configure_file(output: 'config.h', configuration: configh_data)
+
+
+# Stable variables for projects using xkbcommon as a subproject.
+# These variables should not be renamed.
+libxkbcommon_dep = dep_libxkbcommon
+if get_option('enable-x11')
+ libxkbcommon_x11_dep = dep_libxkbcommon_x11
+endif
+if get_option('enable-xkbregistry')
+ libxkbregistry_dep = dep_libxkbregistry
+endif