Add pic variant for libpng (#37964)
This commit is contained in:
parent
75e9742d71
commit
af7b4c5a2f
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,7 @@ class Libpng(CMakePackage):
|
|||
multi=True,
|
||||
description="Build shared libs, static libs or both",
|
||||
)
|
||||
variant("pic", default=False, description="PIC")
|
||||
|
||||
@property
|
||||
def libs(self):
|
||||
|
@ -53,6 +54,7 @@ def cmake_args(self):
|
|||
self.define("ZLIB_ROOT", self.spec["zlib-api"].prefix),
|
||||
self.define("PNG_SHARED", "shared" in self.spec.variants["libs"].value),
|
||||
self.define("PNG_STATIC", "static" in self.spec.variants["libs"].value),
|
||||
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
|
||||
]
|
||||
if self.spec.satisfies("platform=darwin target=aarch64:"):
|
||||
args.append("-DPNG_ARM_NEON=off")
|
||||
|
|
Loading…
Reference in a new issue