libpng: add libs property (#39638)

This commit is contained in:
Adam J. Stewart 2023-08-29 16:00:28 -05:00 committed by GitHub
parent 44922f734d
commit 2f5988cec7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,6 +38,13 @@ class Libpng(CMakePackage):
description="Build shared libs, static libs or both",
)
@property
def libs(self):
# v1.2 does not have a version-less symlink
libraries = f"libpng{self.version.up_to(2).joined}"
shared = "libs=shared" in self.spec
return find_libraries(libraries, root=self.prefix, shared=shared, recursive=True)
class CMakeBuilder(CMakeBuilder):
def cmake_args(self):