diff --git a/recipes/gstreamer/all/conanfile.py b/recipes/gstreamer/all/conanfile.py index 0f8d437ed77fc..a3dedadb08573 100644 --- a/recipes/gstreamer/all/conanfile.py +++ b/recipes/gstreamer/all/conanfile.py @@ -1,4 +1,5 @@ from conans import ConanFile, tools, Meson, VisualStudioBuildEnvironment +from conans.errors import ConanInvalidConfiguration import glob import os import shutil @@ -51,6 +52,11 @@ def config_options(self): if self.settings.os == 'Windows': del self.options.fPIC + def validate(self): + if not self.options["glib"].shared and self.options.shared: + # https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/133 + raise ConanInvalidConfiguration("shared GStreamer cannot link to static GLib") + def build_requirements(self): self.build_requires("meson/0.56.2") self.build_requires("pkgconf/1.7.4") @@ -114,6 +120,9 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "share")) tools.remove_files_by_mask(self.package_folder, "*.pdb") + def package_id(self): + self.info.requires["glib"].full_package_mode() + def package_info(self): gst_plugin_path = os.path.join(self.package_folder, "lib", "gstreamer-1.0")