diff options
author | Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> | 2023-09-13 20:43:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-13 20:43:10 -0400 |
commit | af7b4c5a2fdd2a02674d22e91545764a08daae3f (patch) | |
tree | 2fefd5aec2abfed7d93f539d0edad4a7b0c951a1 | |
parent | 75e9742d7122cb5578faa7af9bb53cfb6d3efb92 (diff) | |
download | spack-af7b4c5a2fdd2a02674d22e91545764a08daae3f.tar.gz spack-af7b4c5a2fdd2a02674d22e91545764a08daae3f.tar.bz2 spack-af7b4c5a2fdd2a02674d22e91545764a08daae3f.tar.xz spack-af7b4c5a2fdd2a02674d22e91545764a08daae3f.zip |
Add pic variant for libpng (#37964)
-rw-r--r-- | var/spack/repos/builtin/packages/libpng/package.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py index d1351c27f2..7187c99706 100644 --- a/var/spack/repos/builtin/packages/libpng/package.py +++ b/var/spack/repos/builtin/packages/libpng/package.py @@ -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 @@ class CMakeBuilder(CMakeBuilder): 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") |