summaryrefslogtreecommitdiff
path: root/src/tomcrypt/private/config.nim
blob: d2ee793b9de5ebac957d65a5d06ff638ecb00ea7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import os

template currentSourceDir(): string =
    ## Return the directory the current source file resides in.
    parentDir(currentSourcePath())

when not defined(tomcryptPrefix):
    const tomcryptPrefix* = currentSourceDir()

when not defined(tomcryptIncDir):
    const tomcryptIncDir* = tomcryptPrefix / "include"

when defined(vcc):
    {.passC:"/I" & tomcryptIncDir.}
else:
    {.passC:"-I" & tomcryptIncDir.}

when not defined(tomcryptLibDir):
    const tomcryptLibDir* = tomcryptPrefix / "lib"

when defined(vcc):
    const tomcryptLibPath* = tomcryptLibDir / "tomcrypt.lib"
else:
    const tomcryptLibPath* = tomcryptLibDir / "libtomcrypt.a"

{.passL:tomcryptLibPath.}