blob: 496ea345a24f2e112b1b91cc5fa26762bca2daa5 (
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(tommathIncPath):
const tommathIncPath = tommathPrefix / "include"
when defined(vcc):
{.passC:"/I" & tommathIncPath.}
else:
{.passC:"-I" & tommathIncPath.}
when not defined(tommathLibPath):
const tommathLibPath = tommathPrefix / "lib"
when defined(vcc):
const libraryPath = tommathLibPath / "tommath.lib"
else:
const libraryPath = tommathLibPath / "libtommath.a"
{.passL:libraryPath.}
|