Skip to content

Commit

Permalink
Don't fail when a package has no lib/bin dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Croydon committed Mar 22, 2024
1 parent 2264dd6 commit 2c3f89b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ def generate(self):
target_licenses_root = os.path.join(self.source_folder, target_dir, "licenses")

for dep in self.dependencies.values():
copy(self, "*.dylib", dep.cpp_info.libdirs[0], os.path.join(self.source_folder, target_dir))
copy(self, "*.dll", dep.cpp_info.libdirs[0], os.path.join(self.source_folder, target_dir))
copy(self, "*.dll", dep.cpp_info.bindirs[0], os.path.join(self.source_folder, target_dir))
for libdir in dep.cpp_info.libdirs:
copy(self, "*.dylib", libdir, os.path.join(self.source_folder, target_dir))
copy(self, "*.dll", libdir, os.path.join(self.source_folder, target_dir))
for bindir in dep.cpp_info.bindirs:
copy(self, "*.dll", bindir, os.path.join(self.source_folder, target_dir))

target_licenses = os.path.join(target_licenses_root, dep.ref.name)
copy(self, "*", os.path.join(dep.package_folder, "licenses"), target_licenses)
Expand Down

0 comments on commit 2c3f89b

Please sign in to comment.