瀏覽代碼

lz4: add version in pkg-config .pc file.

Chen Yufei 3 年之前
父節點
當前提交
be70439f0a
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      packages/l/lz4/xmake.lua

+ 3 - 2
packages/l/lz4/xmake.lua

@@ -20,7 +20,8 @@ package("lz4")
     end
     end
 
 
     on_install(function (package)
     on_install(function (package)
-        io.writefile("xmake.lua", [[
+        io.writefile("xmake.lua", ([[
+            set_version("%s")
             add_rules("mode.debug", "mode.release")
             add_rules("mode.debug", "mode.release")
             target("lz4")
             target("lz4")
                 set_kind("$(kind)")
                 set_kind("$(kind)")
@@ -34,7 +35,7 @@ package("lz4")
                 if is_kind("static") then
                 if is_kind("static") then
                     add_defines("LZ4_HC_STATIC_LINKING_ONLY", "LZ4_STATIC_LINKING_ONLY")
                     add_defines("LZ4_HC_STATIC_LINKING_ONLY", "LZ4_STATIC_LINKING_ONLY")
                 end
                 end
-        ]])
+        ]]):format(package:version_str()))
         local configs = {}
         local configs = {}
         if package:config("shared") then
         if package:config("shared") then
             configs.kind = "shared"
             configs.kind = "shared"