diff options
author | carnold <[email protected]> | 2008-02-13 17:23:14 +0000 |
---|---|---|
committer | carnold <[email protected]> | 2008-02-13 17:23:14 +0000 |
commit | 626a436137c9b9a9384a5c1e9d16eff8dd475f4a (patch) | |
tree | 257352bd214ca34b40326a3e2d0ff5145e52a10e /src/main/java/net | |
parent | b8b269134f3177dbe23a7abd80ba273adf48e8ae (diff) |
Use relative paths on -L options which helps cygwin
git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/cpptasks/trunk@153 32d7a393-a5a9-423c-abd3-5d954feb1f2f
Diffstat (limited to 'src/main/java/net')
-rw-r--r-- | src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java b/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java index ffeb6b2..940d8bc 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java @@ -101,13 +101,19 @@ public abstract class AbstractLdLinker extends CommandLineLinker { LibrarySet set = libsets[i]; File libdir = set.getDir(null); String[] libs = set.getLibs(); - if (libdir != null) { + if (libdir != null) {
+ String relPath = libdir.getAbsolutePath();
+ File outputFile = task.getOutfile();
+ if (outputFile != null && outputFile.getParentFile() != null) {
+ relPath = CUtil.getRelativePath(
+ outputFile.getParentFile().getAbsolutePath(), libdir);
+ } if (set.getType() != null && "framework".equals(set.getType().getValue()) && isDarwin()) { - endargs.addElement("-F" + libdir.getAbsolutePath()); + endargs.addElement("-F" + relPath); } else { - endargs.addElement("-L" + libdir.getAbsolutePath()); + endargs.addElement("-L" + relPath); } } // |