Use nimFile

This commit is contained in:
Joey Yakimowich-Payne 2020-09-09 20:03:58 -06:00
commit 41b7a7405e

View file

@ -1,3 +1,4 @@
import macros
import os, strutils, strformat import os, strutils, strformat
import nimterop/[cimport, build, globals] import nimterop/[cimport, build, globals]
@ -6,6 +7,8 @@ const
baseDir = ProjectCacheDir baseDir = ProjectCacheDir
srcDir = baseDir / "glfw" srcDir = baseDir / "glfw"
buildDir = srcDir / "buildcache" buildDir = srcDir / "buildcache"
currentPath = getProjectPath().parentDir().sanitizePath
generatedPath = (currentPath / "generated" / "glfw").replace("\\", "/")
symbolPluginPath = currentSourcePath.parentDir() / "cleansymbols.nim" symbolPluginPath = currentSourcePath.parentDir() / "cleansymbols.nim"
defs = """ defs = """
glfw3SetVer=05dd2fa glfw3SetVer=05dd2fa
@ -36,9 +39,9 @@ cPluginPath(symbolPluginPath)
{.passL: "-pthread".} {.passL: "-pthread".}
when isDefined(glfw3Static): when isDefined(glfw3Static):
cImport(srcDir/"include"/"GLFW"/"glfw3.h", recurse = true, flags = "-f=ast2 -E__,_ -F__,_ -H") cImport(srcDir/"include"/"GLFW"/"glfw3.h", recurse = true, flags = "-f=ast2 -E__,_ -F__,_ -H", nimFile = generatedPath / "glfw.nim")
else: else:
cImport(srcDir/"include"/"GLFW"/"glfw3.h", recurse = true, dynlib = "glfw3LPath", flags = "-f=ast2 -E__,_ -F__,_ -H") cImport(srcDir/"include"/"GLFW"/"glfw3.h", recurse = true, dynlib = "glfw3LPath", flags = "-f=ast2 -E__,_ -F__,_ -H", nimFile = generatedPath / "glfw.nim")
const const
KEY_LAST* = KEY_MENU KEY_LAST* = KEY_MENU