Skip to content

Commit

Permalink
(#19767) qt: exclude examples from license pattern
Browse files Browse the repository at this point in the history
Don't include license files for examples when the example content is not
built.
  • Loading branch information
mrjoel committed Sep 13, 2023
1 parent d9066ea commit 439299b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion recipes/qt/5.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 2 additions & 1 deletion recipes/qt/6.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 439299b

Please sign in to comment.