diff options
author | David Robillard <d@drobilla.net> | 2023-01-14 17:41:54 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-14 20:35:16 -0500 |
commit | b4ac1ec675b79cd05ed7ff2eda8f41002f3a51ef (patch) | |
tree | d07e7c8c31e6222b6ab59f91b8bc64e935f3b259 /meson.build | |
parent | 19bd8dd62aca4f256616b129177aef277d87728e (diff) | |
download | serd-b4ac1ec675b79cd05ed7ff2eda8f41002f3a51ef.tar.gz serd-b4ac1ec675b79cd05ed7ff2eda8f41002f3a51ef.tar.bz2 serd-b4ac1ec675b79cd05ed7ff2eda8f41002f3a51ef.zip |
Fix and simplify library naming on Windows
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/meson.build b/meson.build index b569c460..b771508e 100644 --- a/meson.build +++ b/meson.build @@ -48,6 +48,16 @@ if host_machine.system() in ['gnu', 'linux'] ] endif +# Use versioned name everywhere to support parallel major version installations +if host_machine.system() == 'windows' + if get_option('default_library') == 'both' + error('default_library=both is not supported on Windows') + endif + soversion = '' +else + soversion = meson.project_version().split('.')[0] +endif + ########### # Library # ########### @@ -73,14 +83,13 @@ sources = files( # Set appropriate arguments for building against the library type extra_c_args = [] -subdir('meson/library') if get_option('default_library') == 'static' extra_c_args = ['-DSERD_STATIC'] endif # Build shared and/or static library libserd = library( - meson.project_name() + library_suffix, + versioned_name, sources, c_args: c_suppressions + extra_c_args + platform_args + [ '-DSERD_INTERNAL', @@ -90,6 +99,7 @@ libserd = library( gnu_symbol_visibility: 'hidden', include_directories: include_dirs, install: true, + soversion: soversion, version: meson.project_version(), ) |