Fix the lib path used with --app:staticlib

For example if gProjectName is "src/false.nim" the old static lib name
was "libsrc/false.nim.a", now it is "libfalse.a".
This commit is contained in:
def
2015-05-07 02:29:31 +02:00
parent b9e02b1efc
commit 81cff0908e

View File

@@ -668,7 +668,8 @@ proc callCCompiler*(projectfile: string) =
it = PStrEntry(it.next)
if optGenStaticLib in gGlobalOptions:
linkCmd = CC[c].buildLib % ["libfile", (libNameTmpl() % gProjectName),
let (_, name, _) = splitFile(gProjectName)
linkCmd = CC[c].buildLib % ["libfile", (libNameTmpl() % name),
"objfiles", objfiles]
else:
var linkerExe = getConfigVar(c, ".linkerexe")