From 883b427acf99d13eca7feeed1f4c423e5a4d9e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 17 Apr 2023 15:54:01 +0400 Subject: [PATCH] Move src/keycodemapdb -> subprojects/keycodemapdb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow better meson build system conventions. This allows to find keymap-gen or CSV without explicitly setting the paths. Signed-off-by: Marc-André Lureau Reviewed-by: Michal Privoznik --- .gitmodules | 2 +- meson.build | 1 + src/util/meson.build | 4 ++-- {src => subprojects}/keycodemapdb | 0 4 files changed, 4 insertions(+), 3 deletions(-) rename {src => subprojects}/keycodemapdb (100%) diff --git a/.gitmodules b/.gitmodules index 79b7e19485..7bee617505 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "keycodemapdb"] - path = src/keycodemapdb + path = subprojects/keycodemapdb url = https://gitlab.com/keycodemap/keycodemapdb.git diff --git a/meson.build b/meson.build index f7f31a278d..de087666f5 100644 --- a/meson.build +++ b/meson.build @@ -2028,6 +2028,7 @@ runutf8 = [ 'LC_ALL=', 'LANG=C', 'LC_CTYPE=en_US.UTF-8' ] top_inc_dir = include_directories('.') +keycodemapdb = subproject('keycodemapdb') # include remaining subdirs diff --git a/src/util/meson.build b/src/util/meson.build index c6b1294f24..c2175f1098 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -138,8 +138,8 @@ keyname_list = [ 'win32', ] -keymap_gen_prog = find_program('keymap-gen', dirs: [meson.project_source_root() / 'src' / 'keycodemapdb' / 'tools' ]) -keymap_src_file = '@0@/src/keycodemapdb/data/keymaps.csv'.format(meson.project_source_root()) +keymap_gen_prog = find_program('keymap-gen') +keymap_src_file = keycodemapdb.get_variable('keymaps_csv') foreach name : keycode_list keycode_gen_sources += custom_target( diff --git a/src/keycodemapdb b/subprojects/keycodemapdb similarity index 100% rename from src/keycodemapdb rename to subprojects/keycodemapdb