blob: 21c06780e94749b4fbe05dedcd361756b50bdf28 (
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(tommathPrefix):
const tommathPrefix* = currentSourceDir()
when not defined(tommathIncDir):
const tommathIncDir* = tommathPrefix / "include"
when defined(vcc):
{.passC:"/I" & tommathIncDir.}
else:
{.passC:"-I" & tommathIncDir.}
when not defined(tommathLibDir):
const tommathLibDir* = tommathPrefix / "lib"
when defined(vcc):
const tommathLibPath* = tommathLibDir / "tommath.lib"
else:
const tommathLibPath* = tommathLibDir / "libtommath.a"
{.passL:tommathLibPath.}
|