Browse Source

Add `on_load` function to volk package script to fix installing error on latest xmake version. (#4632)

JXMaster 1 year ago
parent
commit
e676808121
1 changed files with 6 additions and 0 deletions
  1. 6 0
      packages/v/volk/xmake.lua

+ 6 - 0
packages/v/volk/xmake.lua

@@ -65,6 +65,12 @@ package("volk")
         import("package.tools.xmake").install(package)
     end)
 
+    on_load(function (package)
+        if package:config("header_only") then
+            package:set("kind", "library", {headeronly = true})
+        end
+    end)
+
     on_test(function (package)
         local defines
         if package:config("header_only") then