From 8933d9b3573b1dc7c4d51cb3c31eb5a457aab549 Mon Sep 17 00:00:00 2001 From: Oskari Timperi Date: Tue, 13 Mar 2018 07:31:38 +0200 Subject: Initial commit --- src/tomcrypt/private/config.nim | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/tomcrypt/private/config.nim (limited to 'src/tomcrypt/private') diff --git a/src/tomcrypt/private/config.nim b/src/tomcrypt/private/config.nim new file mode 100644 index 0000000..99c73c7 --- /dev/null +++ b/src/tomcrypt/private/config.nim @@ -0,0 +1,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.} -- cgit v1.2.3