From 66626a6a2073f2fc7654705f71bf15e0eef98711 Mon Sep 17 00:00:00 2001 From: Alexis Jeandet Date: Wed, 23 Nov 2022 16:44:12 +0100 Subject: [PATCH] Force all libs to be static linked Signed-off-by: Alexis Jeandet --- meson.build | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 4a48f54..f7ce916 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'py_tsyganenko', 'cpp', 'c', 'fortran', - version : '0.1.5', + version : '0.1.6', default_options : ['warning_level=2', 'cpp_std=c++17', 'fortran_std=legacy'], license : 'GPL3' ) @@ -26,11 +26,19 @@ srcs = [ 'wrapper/wrapper.cpp' ] +if build_machine.system() == 'windows' + link_args = ['-static-libgfortran', '-static-libstdc++','-static-libgcc','-static'] +elif build_machine.system() == 'darwin' + link_args = ['-static-libgfortran', '-static-libstdc++','-static-libgcc'] +else + link_args = ['-static-libgfortran'] +endif + python3.extension_module('py_tsyganenko', srcs, link_with:[tsyganenko], include_directories:'src', dependencies: [ pybind11_dep, python3.dependency(),libquadmath], - link_args: ['-static-libgfortran'], + link_args: link_args, install: true )