Skip to content

Commit

Permalink
noNimble support
Browse files Browse the repository at this point in the history
  • Loading branch information
krux02 committed Apr 19, 2018
1 parent 8938265 commit 827cbca
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions AntTweakBar.nim
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@

const TW_VERSION* = 116

from strutils import strip, splitLines

proc getAntTweakBarPath(): string {.compileTime.} =
for line in splitLines(staticExec("nimble path AntTweakBar")):
# get the last line and avoid all Hints and Warnings sont to stdout
result = line
result = strip(result)
const antTweakBarPath =
when not defined(antTweakBarNoNimble):
proc getAntTweakBarPath(): string {.compileTime.} =
"."
else:
from strutils import strip, splitLines

proc getAntTweakBarPath(): string {.compileTime.} =
for line in splitLines(staticExec("nimble path AntTweakBar")):
# get the last line and avoid all Hints and Warnings sont to stdout
result = line
result = strip(result)

{.passC: "-I" & getAntTweakBarPath() & "/cAntTweakBar/include" .}
{.passC: "-O3 -Wall -fPIC -fno-strict-aliasing -D__PLACEMENT_NEW_INLINE".}
Expand Down

0 comments on commit 827cbca

Please sign in to comment.