Pārlūkot izejas kodu

Add ext source for lz4 (#826)

Kelvin Zhang 3 gadi atpakaļ
vecāks
revīzija
6b897e9f76
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. 7 0
      packages/l/lz4/xmake.lua

+ 7 - 0
packages/l/lz4/xmake.lua

@@ -13,6 +13,10 @@ package("lz4")
         end
     end)
 
+    if is_plat("macosx") then
+        add_extsources("brew::lz4")
+    end
+
     on_install(function (package)
         io.writefile("xmake.lua", [[
             add_rules("mode.debug", "mode.release")
@@ -24,6 +28,9 @@ package("lz4")
                 if is_kind("shared") and is_plat("windows") then
                     add_defines("LZ4_DLL_EXPORT")
                 end
+                if is_kind("static") then
+                    add_defines("LZ4_HC_STATIC_LINKING_ONLY", "LZ4_STATIC_LINKING_ONLY")
+                end
         ]])
         local configs = {}
         if package:config("shared") then