summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn W. Parent <45471568+johnwparent@users.noreply.github.com>2024-03-09 02:40:27 -0500
committerGitHub <noreply@github.com>2024-03-09 00:40:27 -0700
commitbf14b424bb589558ef03e46627ef53eb31afc891 (patch)
tree613a4db347dc4b56bf5020ddaa5b0824eafd3df2
parent14209a86a66a3e701c72487a27dc3cfc067b40b7 (diff)
downloadspack-bf14b424bb589558ef03e46627ef53eb31afc891.tar.gz
spack-bf14b424bb589558ef03e46627ef53eb31afc891.tar.bz2
spack-bf14b424bb589558ef03e46627ef53eb31afc891.tar.xz
spack-bf14b424bb589558ef03e46627ef53eb31afc891.zip
proj: correct CMake arg for shared build with proj older than 7.0.0 (#43089)
* proj: correct CMake arg for shared build with proj older than 7.0.0 * Actually use new CMake arg * Update var/spack/repos/builtin/packages/proj/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> --------- Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/proj/package.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/proj/package.py b/var/spack/repos/builtin/packages/proj/package.py
index fd876713cd..ef18d834dc 100644
--- a/var/spack/repos/builtin/packages/proj/package.py
+++ b/var/spack/repos/builtin/packages/proj/package.py
@@ -128,10 +128,11 @@ class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta):
class CMakeBuilder(BaseBuilder, cmake.CMakeBuilder):
def cmake_args(self):
+ shared_arg = "BUILD_SHARED_LIBS" if self.spec.satisfies("@7:") else "BUILD_LIBPROJ_SHARED"
args = [
self.define_from_variant("ENABLE_TIFF", "tiff"),
self.define_from_variant("ENABLE_CURL", "curl"),
- self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
+ self.define_from_variant(shared_arg, "shared"),
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
]
if self.spec.satisfies("@6:") and self.pkg.run_tests: