Fix copying Mono shared libs on macOS
This commit is contained in:
parent
683f96df35
commit
7569f2dccb
1 changed files with 9 additions and 5 deletions
|
@ -551,12 +551,16 @@ def copy_mono_shared_libs(env, mono_root, target_mono_root_dir):
|
|||
if not os.path.isdir(target_mono_lib_dir):
|
||||
os.makedirs(target_mono_lib_dir)
|
||||
|
||||
src_mono_lib_dir = os.path.join(mono_root, "lib")
|
||||
|
||||
lib_file_names = []
|
||||
if platform == "osx":
|
||||
lib_file_names = [
|
||||
lib_name + ".dylib"
|
||||
for lib_name in ["libmono-btls-shared", "libmono-native-compat", "libMonoPosixHelper"]
|
||||
]
|
||||
lib_file_names = [lib_name + ".dylib" for lib_name in ["libmono-btls-shared", "libMonoPosixHelper"]]
|
||||
|
||||
if os.path.isfile(os.path.join(src_mono_lib_dir, "libmono-native-compat.dylib")):
|
||||
lib_file_names += ["libmono-native-compat.dylib"]
|
||||
else:
|
||||
lib_file_names += ["libmono-native.dylib"]
|
||||
elif is_unix_like(platform):
|
||||
lib_file_names = [
|
||||
lib_name + ".so"
|
||||
|
@ -573,7 +577,7 @@ def copy_mono_shared_libs(env, mono_root, target_mono_root_dir):
|
|||
]
|
||||
|
||||
for lib_file_name in lib_file_names:
|
||||
copy_if_exists(os.path.join(mono_root, "lib", lib_file_name), target_mono_lib_dir)
|
||||
copy_if_exists(os.path.join(src_mono_lib_dir, lib_file_name), target_mono_lib_dir)
|
||||
|
||||
|
||||
def pkgconfig_try_find_mono_root(mono_lib_names, sharedlib_ext):
|
||||
|
|
Loading…
Reference in a new issue