pineapple/externals/vcpkg/ports/openh264/0001-respect-default-library-option.patch

58 lines
1.7 KiB
Diff
Raw Normal View History

2022-07-23 03:01:36 +02:00
From 328b15a962caa928373b55d85f9911f45442886e Mon Sep 17 00:00:00 2001
From: Xavier Claessens <xavier.claessens@collabora.com>
Date: Mon, 19 Oct 2020 17:03:25 -0400
Subject: [PATCH] meson: Respect default_library option
When using library() instead of shared_library() and static_library,
meson will build shared, static, or both depending on the
value of static_library option.
As far as I know extract_all_objects() was uses as workaround for Meson
bugs fixed a while ago when using not installed static libraries.
---
meson.build | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/meson.build b/meson.build
index 283413375b..65641508de 100644
--- a/meson.build
+++ b/meson.build
@@ -184,26 +184,13 @@ api_header_deps = []
subdir ('codec')
subdir ('test')
-all_objects = [
- libcommon.extract_all_objects(),
- libprocessing.extract_all_objects(),
- libencoder.extract_all_objects(),
- libdecoder.extract_all_objects()
-]
-
-libopenh264_shared = shared_library('openh264',
- objects: all_objects,
+libopenh264 = library('openh264',
+ link_whole: [libcommon, libprocessing, libencoder, libdecoder],
install: true,
soversion: major_version,
- version: meson.project_version(),
vs_module_defs: 'openh264.def',
dependencies: deps)
-libopenh264_static = static_library('openh264',
- objects: all_objects,
- install: true,
- dependencies: deps)
-
pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
foreach t : ['', '-static']
@@ -235,7 +222,7 @@ foreach t : ['', '-static']
endforeach
openh264_dep = declare_dependency(
- link_with: libopenh264_shared,
+ link_with: libopenh264,
include_directories: include_directories('include'),
dependencies: deps + api_header_deps)