'xkbcommon/xkbcommon-names.h',
subdir: 'xkbcommon',
)
+libxkbcommon_dep = declare_dependency(
+ link_with: libxkbcommon,
+)
pkgconfig.generate(
libxkbcommon,
name: 'xkbcommon',
'tools-internal',
'tools/tools-common.h',
'tools/tools-common.c',
- libxkbcommon_sources,
include_directories: include_directories('src'),
+ dependencies: libxkbcommon_dep,
)
tools_dep = declare_dependency(
include_directories: [include_directories('src'), include_directories('tools')],
install: true,
install_dir: dir_libexec)
install_man('tools/xkbcli-compile-keymap.1')
+ # The same tool again, but with access to some private APIS
+ executable('compile-keymap',
+ 'tools/compile-keymap.c',
+ libxkbcommon_sources,
+ dependencies: [tools_dep],
+ c_args: ['-DENABLE_PRIVATE_APIS'],
+ install: false)
configh_data.set10('HAVE_XKBCLI_COMPILE_KEYMAP', true)
executable('xkbcli-how-to-type',
'tools/how-to-type.c',
"Options:\n"
" --verbose\n"
" Enable verbose debugging output\n"
+#if ENABLE_PRIVATE_APIS
" --kccgst\n"
" Print a keymap which only includes the KcCGST component names instead of the full keymap\n"
+#endif
" --rmlvo\n"
" Print the full RMLVO with the defaults filled in for missing elements\n"
" --from-xkb\n"
static struct option opts[] = {
{"help", no_argument, 0, 'h'},
{"verbose", no_argument, 0, OPT_VERBOSE},
+#if ENABLE_PRIVATE_APIS
{"kccgst", no_argument, 0, OPT_KCCGST},
+#endif
{"rmlvo", no_argument, 0, OPT_RMLVO},
{"from-xkb", no_argument, 0, OPT_FROM_XKB},
{"include", required_argument, 0, OPT_INCLUDE},
static bool
print_kccgst(struct xkb_context *ctx, const struct xkb_rule_names *rmlvo)
{
+#if ENABLE_PRIVATE_APIS
struct xkb_component_names kccgst;
if (!xkb_components_from_rules(ctx, rmlvo, &kccgst))
free(kccgst.symbols);
return true;
+#else
+ return false;
+#endif
}
static bool