From 89dc12573bed2dbe0fcda5a222569ab17732e975 Mon Sep 17 00:00:00 2001 From: Tom Schoonjans Date: Tue, 20 Apr 2021 14:59:50 +0100 Subject: [PATCH] meson: force lib prefix on msvc --- src/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/meson.build b/src/meson.build index 59ccc7a0..36d79f8b 100644 --- a/src/meson.build +++ b/src/meson.build @@ -108,6 +108,13 @@ libxrl_sources = shared_sources + [xrayglob_inline] + files( 'xrf_cross_sections_aux.c', ) +if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' + extra_args = {'name_prefix': 'lib'} +else + extra_args = {} +endif + + xraylib_lib = library( 'xrl', libxrl_sources, @@ -118,6 +125,7 @@ xraylib_lib = library( c_args: core_c_args + xraylib_error_flags, gnu_symbol_visibility: 'hidden', include_directories: extra_include_dirs, + kwargs: extra_args, ) xraylib_lib_dep = declare_dependency(