From e8324bb05b684075c268c22692c5675b5e0502de Mon Sep 17 00:00:00 2001 From: Joel Johnson Date: Tue, 12 Sep 2023 18:16:59 -0600 Subject: [PATCH] (#19767) qt: exclude examples from license pattern Don't include license files for examples when the example content is not built. Fixes: #19767 --- recipes/qt/5.x.x/conanfile.py | 3 ++- recipes/qt/6.x.x/conanfile.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index 8e54f6b2a47b0..8bd13d6de1c72 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -841,7 +841,8 @@ def package(self): Translations = bin/datadir/translations Documentation = bin/datadir/doc Examples = bin/datadir/examples""") - copy(self, "*LICENSE*", os.path.join(self.source_folder, "qt5/"), os.path.join(self.package_folder, "licenses")) + copy(self, "*LICENSE*", os.path.join(self.source_folder, "qt5/"), os.path.join(self.package_folder, "licenses"), + excludes="qtbase/examples/*") for module in self._submodules: if not self.options.get_safe(module): rmdir(self, os.path.join(self.package_folder, "licenses", module)) diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index 3edb49f690ce4..513bc60487cfd 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -756,7 +756,8 @@ def package(self): save(self, ".qmake.super" , "") cmake = CMake(self) cmake.install() - copy(self, "*LICENSE*", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*LICENSE*", self.source_folder, os.path.join(self.package_folder, "licenses"), + excludes="qtbase/examples/*") for module in self._get_module_tree: if module != "qtbase" and not self.options.get_safe(module): rmdir(self, os.path.join(self.package_folder, "licenses", module))