Skip to content

Commit

Permalink
tooling: Bundle licenses with cloe-engine Conan package
Browse files Browse the repository at this point in the history
  • Loading branch information
cassava committed Dec 6, 2023
1 parent 5400d3c commit 6b9b419
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion engine/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,23 @@ def build(self):
cm.test()

def package(self):
cm = cmake.CMake(self)
if self.should_install:
cm = cmake.CMake(self)
cm.install()

# Package license files for compliance
for meta, dep in self.dependencies.items():
if dep.package_folder is None:
continue
ref = str(meta.ref)
name = ref[: str(ref).index("/")]
files.copy(
self,
"*",
src=os.path.join(dep.package_folder, "licenses"),
dst=os.path.join(self.package_folder, "licenses", name),
)

def package_id(self):
self.info.requires["boost"].full_package_mode()
del self.info.options.pedantic
Expand Down

0 comments on commit 6b9b419

Please sign in to comment.