Add check for absolute directories
This commit is contained in:
parent
0918f02479
commit
d1813414e3
1 changed files with 8 additions and 5 deletions
13
nimgen.nim
13
nimgen.nim
|
|
@ -585,11 +585,14 @@ proc c2nim(fl, outfile: string, c2nimConfig: c2nimConfigObj) =
|
||||||
passC &= "import ospaths\n"
|
passC &= "import ospaths\n"
|
||||||
|
|
||||||
for inc in gIncludes:
|
for inc in gIncludes:
|
||||||
let relativeInc = inc.replace(gOutput, "")
|
if inc.isAbsolute:
|
||||||
passC &= (
|
passC &= ("""{.passC: "-I\"$#\"".}""" % [inc]) & "\n"
|
||||||
"""{.passC: "-I\"" & currentSourcePath().splitPath().head & "/$#\"".}""" %
|
else:
|
||||||
[relativeInc]
|
let relativeInc = inc.replace(gOutput, "")
|
||||||
) & "\n"
|
passC &= (
|
||||||
|
"""{.passC: "-I\"" & currentSourcePath().splitPath().head & "/$#\"".}""" %
|
||||||
|
[relativeInc]
|
||||||
|
) & "\n"
|
||||||
|
|
||||||
for prag in c2nimConfig.pragma:
|
for prag in c2nimConfig.pragma:
|
||||||
outpragma &= "{." & prag & ".}\n"
|
outpragma &= "{." & prag & ".}\n"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue