summaryrefslogtreecommitdiffstats
path: root/libsmartcols/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:10:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:10:49 +0000
commitcfe5e3905201349e9cf3f95d52ff4bd100bde37d (patch)
treed0baf160cbee3195249d095f85e52d20c21acf02 /libsmartcols/meson.build
parentInitial commit. (diff)
downloadutil-linux-cfe5e3905201349e9cf3f95d52ff4bd100bde37d.tar.xz
util-linux-cfe5e3905201349e9cf3f95d52ff4bd100bde37d.zip
Adding upstream version 2.39.3.upstream/2.39.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libsmartcols/meson.build')
-rw-r--r--libsmartcols/meson.build57
1 files changed, 57 insertions, 0 deletions
diff --git a/libsmartcols/meson.build b/libsmartcols/meson.build
new file mode 100644
index 0000000..122b1e8
--- /dev/null
+++ b/libsmartcols/meson.build
@@ -0,0 +1,57 @@
+dir_libsmartcols = include_directories('.', 'src')
+
+defs = configuration_data()
+defs.set('LIBSMARTCOLS_VERSION', pc_version)
+
+configure_file(
+ input : 'src/libsmartcols.h.in',
+ output : 'libsmartcols.h',
+ configuration : defs,
+ install : build_libsmartcols,
+ install_dir : join_paths(get_option('includedir'), 'libsmartcols'),
+)
+
+lib_smartcols_sources = '''
+ src/smartcolsP.h
+ src/iter.c
+ src/symbols.c
+ src/cell.c
+ src/column.c
+ src/line.c
+ src/table.c
+ src/print.c
+ src/print-api.c
+ src/version.c
+ src/calculate.c
+ src/grouping.c
+ src/walk.c
+ src/init.c
+'''.split()
+
+libsmartcols_sym = 'src/libsmartcols.sym'
+libsmartcols_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libsmartcols_sym)
+
+lib_smartcols = both_libraries(
+ 'smartcols',
+ list_h,
+ lib_smartcols_sources,
+ include_directories : [dir_include, dir_libsmartcols],
+ link_depends : libsmartcols_sym,
+ version : libsmartcols_version,
+ link_args : ['-Wl,--version-script=@0@'.format(libsmartcols_sym_path)],
+ link_with : lib_common,
+ dependencies : build_libsmartcols ? [] : disabler(),
+ install : build_libsmartcols)
+smartcols_dep = declare_dependency(link_with: lib_smartcols, include_directories: '.')
+
+lib_smartcols_static = lib_smartcols.get_static_lib()
+
+if build_libsmartcols
+ pkgconfig.generate(lib_smartcols,
+ description : 'table or tree library',
+ subdirs : 'libsmartcols',
+ version : pc_version)
+ if meson.version().version_compare('>=0.54.0')
+ meson.override_dependency('smartcols', smartcols_dep)
+ endif
+endif