Selaa lähdekoodia

add linmath.h (#2684)

ruki 1 vuosi sitten
vanhempi
commit
8ea26810d2
2 muutettua tiedostoa jossa 16 lisäystä ja 1 poistoa
  1. 15 0
      packages/l/linmath.h/xmake.lua
  2. 1 1
      scripts/new.lua

+ 15 - 0
packages/l/linmath.h/xmake.lua

@@ -0,0 +1,15 @@
+package("linmath.h")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://github.com/datenwolf/linmath.h")
+    set_description("a lean linear math library, aimed at graphics programming. Supports vec3, vec4, mat4x4 and quaternions")
+
+    add_urls("https://github.com/datenwolf/linmath.h.git")
+    add_versions("2022.06.19", "3eef82841046507e16a0f6194a61cee2eadd34b3")
+
+    on_install(function (package)
+        os.cp("linmath.h", package:installdir("include"))
+    end)
+
+    on_test(function (package)
+        assert(package:has_cfuncs("mat4x4_mul", {includes = "linmath.h"}))
+    end)

+ 1 - 1
scripts/new.lua

@@ -226,9 +226,9 @@ function generate_package(reponame, get_data)
 
     -- add dependencies
     if build_system then
-        file:print('')
         local deps = table.wrap(build_system.deps)
         if deps and #deps > 0 then
+            file:print('')
             file:print('    add_deps("' .. table.concat(deps, '", "') .. '")')
         end
     end