浏览代码

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

JXMaster 1 年之前
父节点
当前提交
e676808121
共有 1 个文件被更改,包括 6 次插入0 次删除
  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