From ede906577318a03c6ad4294b39cac5b9f2df7a36 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 6 Sep 2024 10:17:31 +0200 Subject: [PATCH] meson.build: move src/util/*.cxx to libutil.a --- meson.build | 9 ++------- src/util/meson.build | 15 +++++++++++++++ test/meson.build | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 src/util/meson.build diff --git a/meson.build b/meson.build index 1a698365..993bdaf7 100644 --- a/meson.build +++ b/meson.build @@ -368,6 +368,7 @@ if host_machine.system() == 'windows' subdir('src/win') endif +subdir('src/util') subdir('src/lib/fmt') subdir('src/io') subdir('src/system') @@ -420,16 +421,10 @@ ncmpc = executable('ncmpc', 'src/Completion.cxx', 'src/strfsong.cxx', 'src/time_format.cxx', - 'src/util/LocaleString.cxx', - 'src/util/Exception.cxx', - 'src/util/PrintException.cxx', - 'src/util/StringCompare.cxx', - 'src/util/StringStrip.cxx', - 'src/util/StringUTF8.cxx', - 'src/util/UriUtil.cxx', sources, include_directories: inc, dependencies: [ + util_dep, thread_dep, event_dep, pcre_dep, diff --git a/src/util/meson.build b/src/util/meson.build new file mode 100644 index 00000000..fcbd78df --- /dev/null +++ b/src/util/meson.build @@ -0,0 +1,15 @@ +util = static_library( + 'util', + 'LocaleString.cxx', + 'Exception.cxx', + 'PrintException.cxx', + 'StringCompare.cxx', + 'StringStrip.cxx', + 'StringUTF8.cxx', + 'UriUtil.cxx', + include_directories: inc, +) + +util_dep = declare_dependency( + link_with: util, +) diff --git a/test/meson.build b/test/meson.build index bfd9e04d..c26fa293 100644 --- a/test/meson.build +++ b/test/meson.build @@ -3,10 +3,10 @@ executable( 'run_hscroll.cxx', objects: ncmpc.extract_objects( 'src/BasicMarquee.cxx', - 'src/util/LocaleString.cxx', ), include_directories: inc, dependencies: [ + util_dep, fmt_dep, ], )