From 869c8e331ed5491546df587f0f1ed65fd2a8ddff Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 26 Jan 2020 13:41:43 +0200 Subject: [PATCH] stbi: make compilation faster by generating a stbi.o file --- thirdparty/stb_image/stbi.c | 3 +++ vlib/stbi/stbi.v | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 thirdparty/stb_image/stbi.c diff --git a/thirdparty/stb_image/stbi.c b/thirdparty/stb_image/stbi.c new file mode 100644 index 0000000000..0375a5ab75 --- /dev/null +++ b/thirdparty/stb_image/stbi.c @@ -0,0 +1,3 @@ + +#define STB_IMAGE_IMPLEMENTATION +#include "stb_image.h" diff --git a/vlib/stbi/stbi.v b/vlib/stbi/stbi.v index 7b35184b65..be0648cd8b 100644 --- a/vlib/stbi/stbi.v +++ b/vlib/stbi/stbi.v @@ -7,10 +7,10 @@ module stbi // note we might need special case for this // import gl -#flag -I @VROOT/thirdparty/stb_image - -#define STB_IMAGE_IMPLEMENTATION +#flag -I @VROOT/thirdparty/stb_image #include "stb_image.h" +#flag @VROOT/thirdparty/stb_image/stbi.o + pub struct Image { mut: width int