diff options
author | L. E. Segovia <amy@amyspark.me> | 2023-08-22 03:41:07 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2023-09-20 19:23:49 +0300 |
commit | 59214481ae4c9efcd0a0257cc8a6f195896ce0d6 (patch) | |
tree | 0b56a90a721f5fb69c0163a8ae3c178f195aaa5a | |
parent | 4144cc3c17d6802ec55bd9292125ccc82f207944 (diff) |
meson: Tell cargo to prefer static libraries
This fixes most, but not all, of the build errors in Windows when using
static libraries.
The ones remaining are:
- redirection of gstreamer-1.0 towards gstreamer-full-1.0
- Cairo not exporting the C++ stdlib requirement when built statically
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1330>
-rw-r--r-- | meson.build | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meson.build b/meson.build index bd645e473..88a395a05 100644 --- a/meson.build +++ b/meson.build @@ -324,6 +324,15 @@ if get_option('rav1e').allowed() and find_program('nasm', required: false).found features += 'gst-plugin-rav1e/asm' endif +if get_option('default_library') == 'static' + extra_env += { + # Tell the pkg-config crate to think of all libraries as static + 'PKG_CONFIG_ALL_STATIC': '1', + # Tell the system-deps crate to process linker flag for static deps + 'SYSTEM_DEPS_LINK': 'static' + } +endif + foreach plugin_name, details: plugins plugin_opt = get_option(plugin_name) if plugin_opt.allowed() |