فهرست منبع

Move onnx to lab

luboslenco 1 سال پیش
والد
کامیت
7f6e06a702
1فایلهای تغییر یافته به همراه13 افزوده شده و 1 حذف شده
  1. 13 1
      armorlab/kincflags.js

+ 13 - 1
armorlab/kincflags.js

@@ -10,11 +10,23 @@ flags.with_stb_image_write = true;
 flags.with_g2 = true;
 flags.with_iron = true;
 flags.with_zui = true;
-flags.with_onnx = true;
 
 flags.on_project_created = async function(project) {
 	project.addDefine('IDLE_SLEEP');
 
+	project.addDefine('WITH_ONNX');
+	project.addIncludeDir("../armorlab/onnx/include");
+	if (platform === Platform.Windows) {
+		project.addLib('../armorlab/onnx/win32/onnxruntime');
+	}
+	else if (platform === Platform.Linux) {
+		// patchelf --set-rpath . ArmorLab
+		project.addLib('onnxruntime -L' + __dirname + '/../armorlab/onnx/linux');
+	}
+	else if (platform === Platform.OSX) {
+		project.addLib('../armorlab/onnx/macos/libonnxruntime.1.14.1.dylib');
+	}
+
 	if (graphics === 'vulkan') {
 		project.addDefine('KORE_VKRT');
 		await project.addProject('../armorlab/glsl_to_spirv');