summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-06-01 22:01:42 +0200
committerGitHub <noreply@github.com>2018-06-01 22:01:42 +0200
commit8684b631182dffebba27bdf538129818321d0d7d (patch)
tree27ba9c005555d754e85426520498046e411c6f0e
parentff0d295d9e5472fe974b8e14030107ed8c4e394f (diff)
parentf2d669f5d33ee42d22ee5506b131ef9ab91e2edd (diff)
Merge pull request #19310 from hpvb/fix-mingw-static-mono-linking
Fix Mono static linking on Mingw
-rw-r--r--modules/mono/config.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/mono/config.py b/modules/mono/config.py
index 3afb8a8892..8b52d77f80 100644
--- a/modules/mono/config.py
+++ b/modules/mono/config.py
@@ -80,7 +80,11 @@ def configure(env):
if mono_static:
lib_suffix = Environment()['LIBSUFFIX']
- mono_static_lib_name = 'libmono-static-sgen'
+
+ if env.msvc:
+ mono_static_lib_name = 'libmono-static-sgen'
+ else:
+ mono_static_lib_name = 'libmonosgen-2.0'
if not os.path.isfile(os.path.join(mono_lib_path, mono_static_lib_name + lib_suffix)):
raise RuntimeError('Could not find static mono library in: ' + mono_lib_path)
@@ -93,7 +97,10 @@ def configure(env):
env.Append(LINKFLAGS='LIBCMT' + lib_suffix)
env.Append(LINKFLAGS='Psapi' + lib_suffix)
else:
- env.Append(LIBS=mono_static_lib_name)
+ env.Append(LINKFLAGS=os.path.join(mono_lib_path, mono_static_lib_name + lib_suffix))
+
+ env.Append(LIBS='psapi')
+ env.Append(LIBS='version')
else:
mono_lib_name = find_file_in_dir(mono_lib_path, mono_lib_names, extension='.lib')