瀏覽代碼

Merge pull request #5448 from goldenbergdaniel/kb-text-shape

Add unix build script for kb_text_shape
Jeroen van Rijn 2 月之前
父節點
當前提交
d42c46dad9

+ 1 - 1
vendor/kb_text_shape/kb_text_shape_procs.odin

@@ -6,7 +6,7 @@ when ODIN_OS == .Windows {
 	}
 } else {
 	foreign import lib {
-		"kb_text_shape.a",
+		"lib/kb_text_shape.a",
 	}
 }
 

+ 7 - 0
vendor/kb_text_shape/src/build_unix.sh

@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+
+mkdir -p "../lib"
+cc -O2 -c kb_text_shape.c
+ar -rcs ../lib/kb_text_shape.a kb_text_shape.o
+rm *.o

+ 3 - 0
vendor/kb_text_shape/src/kb_text_shape.c

@@ -1,4 +1,7 @@
 #include <stdint.h>
+#ifndef _MSC_VER
+  #include <string.h>
+#endif
 
 #define KB_TEXT_SHAPE_NO_CRT
 #define KB_TEXT_SHAPE_IMPLEMENTATION