Browse Source

Add extsources to libogg (#1342)

ImperatorS79 3 years ago
parent
commit
22e44ef3b7
1 changed files with 8 additions and 0 deletions
  1. 8 0
      packages/l/libogg/xmake.lua

+ 8 - 0
packages/l/libogg/xmake.lua

@@ -13,6 +13,14 @@ package("libogg")
         add_deps("make")
         add_deps("make")
     end
     end
 
 
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::libogg")
+    elseif is_plat("linux") then
+        add_extsources("pacman::libogg", "apt::libogg-dev")
+    elseif is_plat("macosx") then
+        add_extsources("brew::libogg")
+    end
+
     on_install("windows", "macosx", "linux", "mingw", "iphoneos", "android", "cross", function (package)
     on_install("windows", "macosx", "linux", "mingw", "iphoneos", "android", "cross", function (package)
         local configs = {"-DBUILD_TESTING=OFF"}
         local configs = {"-DBUILD_TESTING=OFF"}
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))