* use an absolute output path for the linker when creating shared libraries,

so they can be used regardless where the executable is located

git-svn-id: trunk@1588 -
This commit is contained in:
Jonas Maebe 2005-10-23 18:19:03 +00:00
parent c02951be35
commit 41d2ba68fe

View File

@ -32,6 +32,11 @@ implementation
uses
cutils,cclasses,
{$ifdef USE_SYSUTILS}
sysutils,
{$else USE_SYSUTILS}
dos,
{$endif USE_SYSUTILS}
verbose,systems,globtype,globals,
symconst,script,
fmodule,aasmbase,aasmtai,aasmcpu,cpubase,symsym,symdef,
@ -584,7 +589,15 @@ begin
{ Call linker }
SplitBinCmd(Info.DllCmd[1],binstr,cmdstr);
{$ifndef darwin}
Replace(cmdstr,'$EXE',maybequoted(current_module.sharedlibfilename^));
{$else darwin}
{$ifdef USE_SYSUTILS}
Replace(cmdstr,'$EXE',maybequoted(ExpandFileName(current_module.sharedlibfilename^)));
{$else USE_SYSUTILS}
Replace(cmdstr,'$EXE',maybequoted(FExpand(current_module.sharedlibfilename^)));
{$endif USE_SYSUTILS}
{$endif darwin}
Replace(cmdstr,'$OPT',Info.ExtraOptions);
Replace(cmdstr,'$RES',maybequoted(outputexedir+Info.ResName));
Replace(cmdstr,'$INIT',InitStr);