Add shared and pic variants to libtiff (#37965)
* Add static-only option for libtiff * update libtiff to add pic variant * fix libtiff pic setting
This commit is contained in:
parent
b3268c2703
commit
fcd49f2f08
1 changed files with 9 additions and 0 deletions
|
@ -75,6 +75,9 @@ class Libtiff(CMakePackage, AutotoolsPackage):
|
|||
|
||||
build_system(conditional("cmake", when="@4.0.5:"), "autotools", default="cmake")
|
||||
|
||||
variant("shared", default=True, description="Build shared")
|
||||
variant("pic", default=False, description="Enable position-independent code (PIC)")
|
||||
|
||||
with when("build_system=cmake"):
|
||||
depends_on("cmake@3.9:", when="@4.3:", type="build")
|
||||
depends_on("cmake@2.8.11:", when="@4.0.10:4.2", type="build")
|
||||
|
@ -112,6 +115,8 @@ class CMakeBuilder(CMakeBuilder):
|
|||
def cmake_args(self):
|
||||
args = [self.define_from_variant(var) for var in VARIANTS]
|
||||
args.append("-Dsphinx=OFF")
|
||||
args += [self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
|
||||
args += [self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic")]
|
||||
|
||||
# Remove empty strings
|
||||
args = [arg for arg in args if arg]
|
||||
|
@ -124,6 +129,10 @@ def configure_args(self):
|
|||
args = []
|
||||
for var in VARIANTS:
|
||||
args.extend(self.enable_or_disable(var))
|
||||
|
||||
args.append("--disable-sphinx")
|
||||
|
||||
args.extend(self.enable_or_disable("shared"))
|
||||
args.extend(self.with_or_without("pic"))
|
||||
|
||||
return args
|
||||
|
|
Loading…
Reference in a new issue