From dbfd0a833d7f8b08350d038d3ca452037a5a3391 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Mar 2023 12:25:30 +0100 Subject: [PATCH] io/meson.build: move sources to libio_fs.a Only that one has a dependency on libfs.a (for class AllocatedPath etc.). --- meson.build | 4 ++-- src/config/meson.build | 1 + src/fs/io/meson.build | 2 +- src/fs/meson.build | 1 - src/io/meson.build | 24 +++++++++++++++++++++--- test/meson.build | 3 ++- 6 files changed, 27 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 31b45bf66..b6eb58797 100644 --- a/meson.build +++ b/meson.build @@ -386,6 +386,8 @@ endif subdir('src/util') subdir('src/cmdline') subdir('src/time') +subdir('src/lib/icu') +subdir('src/fs') subdir('src/io') subdir('src/io/uring') subdir('src/system') @@ -399,7 +401,6 @@ subdir('src/apple') subdir('src/pcm') subdir('src/lib/dbus') -subdir('src/lib/icu') subdir('src/lib/smbclient') subdir('src/lib/zlib') @@ -424,7 +425,6 @@ subdir('src/lib/crypto') subdir('src/zeroconf') -subdir('src/fs') subdir('src/fs/io') subdir('src/fs/glue') subdir('src/config') diff --git a/src/config/meson.build b/src/config/meson.build index 696f3af14..9cc7faa0f 100644 --- a/src/config/meson.build +++ b/src/config/meson.build @@ -17,6 +17,7 @@ config = static_library( fmt_dep, fs_dep, fs_glue_dep, + io_fs_dep, ], ) diff --git a/src/fs/io/meson.build b/src/fs/io/meson.build index c411f7b08..65c8abfb8 100644 --- a/src/fs/io/meson.build +++ b/src/fs/io/meson.build @@ -4,7 +4,7 @@ fs_io = static_library( include_directories: inc, dependencies: [ fs_dep, - io_dep, + io_fs_dep, system_dep, zlib_dep, ], diff --git a/src/fs/meson.build b/src/fs/meson.build index 018be1469..ef39b78cc 100644 --- a/src/fs/meson.build +++ b/src/fs/meson.build @@ -26,7 +26,6 @@ fs = static_library( include_directories: inc, dependencies: [ shlwapi_dep, - system_dep, icu_dep, fmt_dep, ], diff --git a/src/io/meson.build b/src/io/meson.build index 613f6b9dd..3f4383578 100644 --- a/src/io/meson.build +++ b/src/io/meson.build @@ -3,9 +3,7 @@ io = static_library( 'FileDescriptor.cxx', 'Open.cxx', 'PeekReader.cxx', - 'FileReader.cxx', 'BufferedReader.cxx', - 'FileOutputStream.cxx', 'BufferedOutputStream.cxx', include_directories: inc, dependencies: [ @@ -16,6 +14,26 @@ io = static_library( io_dep = declare_dependency( link_with: io, dependencies: [ - fmt_dep, + ], +) + +io_fs = static_library( + 'io_fs', + 'FileReader.cxx', + 'FileOutputStream.cxx', + include_directories: inc, + dependencies: [ + fmt_dep, + io_dep, + fs_dep, + ], +) + +io_fs_dep = declare_dependency( + link_with: io_fs, + dependencies: [ + fmt_dep, + io_dep, + fs_dep, ], ) diff --git a/test/meson.build b/test/meson.build index 77b252cd2..f06f5ef15 100644 --- a/test/meson.build +++ b/test/meson.build @@ -149,7 +149,7 @@ executable( include_directories: inc, dependencies: [ fs_dep, - io_dep, + io_fs_dep, ], ) @@ -180,6 +180,7 @@ if zlib_dep.found() include_directories: inc, dependencies: [ fs_dep, + io_fs_dep, zlib_dep, ], )