Merge pull request #11187 from carlocab/cmake-rpath
formula: add rpath helper method
This commit is contained in:
commit
d89eda09ab
@ -3,6 +3,7 @@
|
||||
|
||||
class Formula
|
||||
undef shared_library
|
||||
undef rpath
|
||||
|
||||
def shared_library(name, version = nil)
|
||||
suffix = if version == "*" || (name == "*" && version.blank?)
|
||||
@ -13,6 +14,10 @@ class Formula
|
||||
"#{name}.so#{suffix}"
|
||||
end
|
||||
|
||||
def rpath
|
||||
"'$ORIGIN/../lib'"
|
||||
end
|
||||
|
||||
class << self
|
||||
undef ignore_missing_libraries
|
||||
|
||||
|
||||
@ -1523,6 +1523,12 @@ class Formula
|
||||
"#{name}#{infix}.dylib"
|
||||
end
|
||||
|
||||
# Executable/Library RPATH according to platform conventions.
|
||||
sig { returns(String) }
|
||||
def rpath
|
||||
"@loader_path/../lib"
|
||||
end
|
||||
|
||||
# an array of all core {Formula} names
|
||||
# @private
|
||||
def self.core_names
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user