diff options
Diffstat (limited to 'src/tommath/private')
| -rw-r--r-- | src/tommath/private/config.nim | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/tommath/private/config.nim b/src/tommath/private/config.nim index 07893da..496ea34 100644 --- a/src/tommath/private/config.nim +++ b/src/tommath/private/config.nim @@ -4,10 +4,23 @@ template currentSourceDir(): string = ## Return the directory the current source file resides in. parentDir(currentSourcePath()) -when hostOS == "windows": - const libraryName = currentSourceDir() & "/lib/tommath.lib" +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 libraryName = currentSourceDir() & "/lib/libtommath.a" + const libraryPath = tommathLibPath / "libtommath.a" -{.passC:"-I" & currentSourceDir() & "/include".} -{.passL:libraryName.} +{.passL:libraryPath.} |
