From e392dff30f28cf9156b7080792068d08f609c1c6 Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Sat, 19 Oct 2019 14:24:30 -0600 Subject: [PATCH] WIP Windows support --- nanovg.nimble | 5 +++-- src/nanovg/wrapper.nim | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/nanovg.nimble b/nanovg.nimble index 0ec2d06..f64364c 100644 --- a/nanovg.nimble +++ b/nanovg.nimble @@ -6,8 +6,6 @@ description = "A wrapper around nanovg" license = "MIT" srcDir = "src" - - # Dependencies requires "nim >= 1.0.0", @@ -15,3 +13,6 @@ requires "nim >= 1.0.0", "regex >= 0.12.0", "opengl >= 1.2.2", "https://github.com/jyapayne/nim-glfw#d4f30db" + +task buildExample, "Build example": + exec "nim c -d:release -d:danger -r examples/demo.nim" diff --git a/src/nanovg/wrapper.nim b/src/nanovg/wrapper.nim index 4119bbe..8cc134b 100644 --- a/src/nanovg/wrapper.nim +++ b/src/nanovg/wrapper.nim @@ -68,6 +68,9 @@ when defined(macosx): elif defined(unix): {.passC: "-DNANOVG_GL3_IMPLEMENTATION -DNANOVG_GLEW".} {.passL: "-lGL -lGLU -lGLEW -lm -lglfw".} +elif defined(windows): + {.passC: "-DNANOVG_GL3_IMPLEMENTATION -DNANOVG_GLEW -D_CRT_SECURE_NO_WARNINGS".} + {.passL: "-lglew32 -lm -lglfw3 -lgdi32 -lwinmm -luser32 -lglu32 -lopengl32 -lkernel32".} # Compile in any common source code