Permalink
Browse files

Windows port: Ensure ld can locate the libraries the temporary binary…

  • Loading branch information...
1 parent ecef2be commit 76cee1c0d8788247b3db80bc6b3b4b2ae6c870ce @dieterv committed Apr 26, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 giscanner/dumper.py
View
@@ -21,6 +21,7 @@
import os
import sys
+import re
import subprocess
import shutil
import tempfile
@@ -274,6 +275,10 @@ def _add_link_internal_args(self, args, libtool):
if library.endswith(".la"): # explicitly specified libtool library
args.append(library)
else:
+ if os.name == 'nt':
+ lt_dll_pat = re.compile(r'^lib(.*)-[0-9][0-9]*$')
+ if lt_dll_pat.match(library):
+ library = lt_dll_pat.sub(r'\1', library)
args.append('-l' + library)
for library_path in self._options.library_paths:
@@ -297,6 +302,10 @@ def _add_link_external_args(self, args):
if library.endswith(".la"): # explicitly specified libtool library
args.append(library)
else:
+ if os.name == 'nt':
+ lt_dll_pat = re.compile(r'^lib(.*)-[0-9][0-9]*$')
+ if lt_dll_pat.match(library):
+ library = lt_dll_pat.sub(r'\1', library)
args.append('-l' + library)
def compile_introspection_binary(options, get_type_functions,

0 comments on commit 76cee1c

Please sign in to comment.