meson: Correct support for building on Windows

Let soversion base on version if not set. For example, if version is 3.6.0
and soversion is not defined, it is set to 3.
This commit is contained in:
Lzu Tao
2018-12-13 14:58:17 +07:00
parent 67babb6d23
commit fa2fc274fd
3 changed files with 22 additions and 46 deletions
+4 -3
View File
@@ -88,14 +88,15 @@ install_man(join_paths(zstd_rootdir, 'programs/zstd.1'),
InstallSymlink_py = '../InstallSymlink.py'
zstd_man1_dir = join_paths(zstd_mandir, 'man1')
man1_EXT = host_machine_os != os_windows ? '.1.gz' : '.1'
bin_EXT = host_machine_os == os_windows ? '.exe' : ''
man1_EXT = '.1.gz' # Meson automatically compresses manpages
foreach f : ['zstdcat', 'unzstd']
meson.add_install_script(InstallSymlink_py, 'zstd', f, zstd_bindir)
meson.add_install_script(InstallSymlink_py, 'zstd' + bin_EXT, f + bin_EXT, zstd_bindir)
meson.add_install_script(InstallSymlink_py, 'zstd' + man1_EXT, f + man1_EXT, zstd_man1_dir)
endforeach
if use_multi_thread
meson.add_install_script(InstallSymlink_py, 'zstd', 'zstdmt', zstd_bindir)
meson.add_install_script(InstallSymlink_py, 'zstd' + bin_EXT, 'zstdmt' + bin_EXT, zstd_bindir)
meson.add_install_script(InstallSymlink_py, 'zstd' + man1_EXT, 'zstdmt' + man1_EXT, zstd_man1_dir)
endif