Skip to content

Commit

Permalink
meson.build: move src/util/*.cxx to libutil.a
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Sep 6, 2024
1 parent 96a7e36 commit ede9065
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
9 changes: 2 additions & 7 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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,
Expand Down
15 changes: 15 additions & 0 deletions src/util/meson.build
Original file line number Diff line number Diff line change
@@ -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,
)
2 changes: 1 addition & 1 deletion test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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,
],
)

0 comments on commit ede9065

Please sign in to comment.