libssh2: fix linking on macOS (#16012)
* libssh2: fix linking on macOS * Fix libgit2 linkage to libssh2
This commit is contained in:
parent
cba5f71eee
commit
69f7bae8fe
2 changed files with 7 additions and 0 deletions
|
@ -57,6 +57,7 @@ class Libgit2(CMakePackage):
|
|||
# Build Dependencies
|
||||
depends_on('cmake@2.8:', type='build', when="@:0.28")
|
||||
depends_on('cmake@3.5:', type='build', when="@0.99:")
|
||||
depends_on('pkgconfig', type='build')
|
||||
|
||||
# Runtime Dependencies
|
||||
depends_on('libssh2', when='+ssh')
|
||||
|
|
|
@ -28,3 +28,9 @@ def cmake_args(self):
|
|||
spec = self.spec
|
||||
return [
|
||||
'-DBUILD_SHARED_LIBS=%s' % ('YES' if '+shared' in spec else 'NO')]
|
||||
|
||||
@run_after('install')
|
||||
def darwin_fix(self):
|
||||
# The shared library is not installed correctly on Darwin; fix this
|
||||
if self.spec.satisfies('platform=darwin'):
|
||||
fix_darwin_install_name(self.prefix.lib)
|
||||
|
|
Loading…
Reference in a new issue