From 1ccfb7f29da36e1b1b2bc777a2b7a8cef00057a7 Mon Sep 17 00:00:00 2001 From: Sergio Arroutbi Date: Sat, 18 May 2024 10:13:15 +0200 Subject: [PATCH] Update meson.build --- lib/meson.build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/meson.build b/lib/meson.build index 703ae37..a997ca9 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -2,8 +2,14 @@ flags = '-Wl,--version-script=' + meson.current_source_dir() + '/libjose.map' code = 'int main() { return 0; }' cc = meson.get_compiler('c') -if not cc.links(code, args: flags + ',--undefined-version' , name: '-Wl,--version-script=...') - flags = [ '-export-symbols-regex=^jose_.*' ] +if host_machine.system() == 'freebsd' + if not cc.links(code, args: flags + ',--undefined-version' , name: '-Wl,--version-script=...') + flags = [ '-export-symbols-regex=^jose_.*' ] + endif +else + if not cc.links(code, args: flags, name: '-Wl,--version-script=...') + flags = [ '-export-symbols-regex=^jose_.*' ] + endif endif libjose_lib = shared_library('jose',