Meson: Allow building as subproject
Specify where to find the headers for libxkbcommon_dep, libxkbcommon_x11_dep, and libxkbregistry_dep, which allows other projects to correctly locate the headers when libxkbcommon is being built as a Meson subproject. The dep_libxkbregistry variable is renamed to libxkbregistry_dep, to follow the usual convention for variables which hold declared dependencies to be used from subproject builds.master
parent
5cd76a8d93
commit
4238417ba0
14
meson.build
14
meson.build
|
@ -264,8 +264,11 @@ install_headers(
|
||||||
'xkbcommon/xkbcommon-names.h',
|
'xkbcommon/xkbcommon-names.h',
|
||||||
subdir: 'xkbcommon',
|
subdir: 'xkbcommon',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# This variable may be used to build as a subproject and should not be renamed.
|
||||||
libxkbcommon_dep = declare_dependency(
|
libxkbcommon_dep = declare_dependency(
|
||||||
link_with: libxkbcommon,
|
link_with: libxkbcommon,
|
||||||
|
include_directories: include_directories('.'),
|
||||||
)
|
)
|
||||||
pkgconfig.generate(
|
pkgconfig.generate(
|
||||||
libxkbcommon,
|
libxkbcommon,
|
||||||
|
@ -331,8 +334,10 @@ You can disable X11 support with -Denable-x11=false.''')
|
||||||
'xkbcommon/xkbcommon-x11.h',
|
'xkbcommon/xkbcommon-x11.h',
|
||||||
subdir: 'xkbcommon',
|
subdir: 'xkbcommon',
|
||||||
)
|
)
|
||||||
|
# This variable may be used to build as a subproject and should not be renamed.
|
||||||
libxkbcommon_x11_dep = declare_dependency(
|
libxkbcommon_x11_dep = declare_dependency(
|
||||||
link_with: libxkbcommon_x11,
|
link_with: libxkbcommon_x11,
|
||||||
|
include_directories: include_directories('.'),
|
||||||
)
|
)
|
||||||
pkgconfig.generate(
|
pkgconfig.generate(
|
||||||
libxkbcommon_x11,
|
libxkbcommon_x11,
|
||||||
|
@ -394,8 +399,9 @@ if get_option('enable-xkbregistry')
|
||||||
description: 'XKB API to query available rules, models, layouts, variants and options',
|
description: 'XKB API to query available rules, models, layouts, variants and options',
|
||||||
)
|
)
|
||||||
|
|
||||||
dep_libxkbregistry = declare_dependency(
|
# This variable may be used to build as a subproject and should not be renamed.
|
||||||
include_directories: include_directories('xkbcommon'),
|
libxkbregistry_dep = declare_dependency(
|
||||||
|
include_directories: include_directories('.'),
|
||||||
link_with: libxkbregistry
|
link_with: libxkbregistry
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
@ -508,7 +514,7 @@ You can disable the Wayland xkbcli programs with -Denable-wayland=false.''')
|
||||||
configh_data.set10('HAVE_XKBCLI_LIST', true)
|
configh_data.set10('HAVE_XKBCLI_LIST', true)
|
||||||
executable('xkbcli-list',
|
executable('xkbcli-list',
|
||||||
'tools/registry-list.c',
|
'tools/registry-list.c',
|
||||||
dependencies: dep_libxkbregistry,
|
dependencies: libxkbregistry_dep,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: dir_libexec)
|
install_dir: dir_libexec)
|
||||||
install_man('tools/xkbcli-list.1')
|
install_man('tools/xkbcli-list.1')
|
||||||
|
@ -679,7 +685,7 @@ if get_option('enable-xkbregistry')
|
||||||
'registry',
|
'registry',
|
||||||
executable('test-registry', 'test/registry.c',
|
executable('test-registry', 'test/registry.c',
|
||||||
include_directories: include_directories('src'),
|
include_directories: include_directories('src'),
|
||||||
dependencies: dep_libxkbregistry),
|
dependencies: libxkbregistry_dep),
|
||||||
env: test_env,
|
env: test_env,
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue