From 9164daed73ac4e32ba5397ee5ee9ed9eba4b181f Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 5 Jul 2024 18:47:09 +0530 Subject: libvpx.recipe: Also build a shared lib on macOS We want both dynamic and static libraries on macOS, and only static libs on iOS, Android, Windows. We used to have a static library on all platforms because libvpx's custom build system was too finicky regarding shared builds. With the port to Meson, for some reason the libvpx recipe was specifying *only* dylibs on macOS, which is not intended. We continue to require static libs on Windows because libvpx only supports those. Co-Authored-by: L. E. Segovia Part-of: --- recipes/libvpx.recipe | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/recipes/libvpx.recipe b/recipes/libvpx.recipe index 0985d049..de808cc2 100644 --- a/recipes/libvpx.recipe +++ b/recipes/libvpx.recipe @@ -15,7 +15,6 @@ class Recipe(recipe.Recipe): licenses = [{License.BSD: ['LICENSE'], License.Misc: ['PATENTS']}] btype = BuildType.MESON - library_type = LibraryType.STATIC meson_options = { 'size_limit': '16384x16384', 'unit_tests': 'disabled', @@ -44,14 +43,11 @@ class Recipe(recipe.Recipe): # make sure the linker uses the correct stdlib when building with # 10.13 which makes the usage of libstdc++ a hard error. self.append_env('LDFLAGS', '-stdlib=libc++') - if self.config.target_platform == Platform.DARWIN: - self.library_type = LibraryType.SHARED - elif self.config.target_platform == Platform.IOS: - self.library_type = LibraryType.STATIC - elif self.config.target_platform == Platform.WINDOWS: - self.library_type = LibraryType.STATIC - elif self.config.target_platform == Platform.ANDROID: + + if self.config.target_platform in (Platform.IOS, Platform.ANDROID, Platform.WINDOWS): self.library_type = LibraryType.STATIC + + if self.config.target_platform == Platform.ANDROID: # See https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/71 self.meson_options['cpu_features_path'] = os.path.join(self.config.toolchain_prefix, 'sources', 'android', 'cpufeatures') -- cgit v1.2.3