blob: 99c73c79e41820ef93d7b0cfb80b0cbf777748f8 (
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(tomcryptIncPath):
const tomcryptIncPath = tomcryptPrefix / "include"
when defined(vcc):
{.passC:"/I" & tomcryptIncPath.}
else:
{.passC:"-I" & tomcryptIncPath.}
when not defined(tomcryptLibPath):
const tomcryptLibPath = tomcryptPrefix / "lib"
when defined(vcc):
const libraryPath = tomcryptLibPath / "tomcrypt.lib"
else:
const libraryPath = tomcryptLibPath / "libtomcrypt.a"
{.passL:libraryPath.}
|