Header path compatibility for windows

This commit is contained in:
coffeepots 2018-02-16 14:22:49 +00:00
parent 44049a0e63
commit ed24c5e5eb
1 changed files with 4 additions and 2 deletions

View File

@ -1,10 +1,12 @@
import ttmathuint import ttmathuint
export ttmathuint export ttmathuint
import strutils import strutils
from os import DirSep
{.passC: "-I" & currentSourcePath.rsplit("/", 1)[0].} const ttmathPath = currentSourcePath.rsplit(DirSep, 1)[0]
{.passC: "-I" & ttmathPath.}
const TTMATH_HEADER = "headers/ttmath.h" const TTMATH_HEADER = ttmathPath & DirSep & "headers" & DirSep & "ttmath.h"
type type
Int256* {.importc: "ttmath::Int<4>", header: TTMATH_HEADER.} = object Int256* {.importc: "ttmath::Int<4>", header: TTMATH_HEADER.} = object