summaryrefslogtreecommitdiff
path: root/src/tommath/private/config.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/tommath/private/config.nim')
-rw-r--r--src/tommath/private/config.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tommath/private/config.nim b/src/tommath/private/config.nim
new file mode 100644
index 0000000..07893da
--- /dev/null
+++ b/src/tommath/private/config.nim
@@ -0,0 +1,13 @@
+import os
+
+template currentSourceDir(): string =
+ ## Return the directory the current source file resides in.
+ parentDir(currentSourcePath())
+
+when hostOS == "windows":
+ const libraryName = currentSourceDir() & "/lib/tommath.lib"
+else:
+ const libraryName = currentSourceDir() & "/lib/libtommath.a"
+
+{.passC:"-I" & currentSourceDir() & "/include".}
+{.passL:libraryName.}