Browse Source

Add extsources to openal and vorbis (#602)

ImperatorS79 4 years ago
parent
commit
8a16ba0009
2 changed files with 17 additions and 0 deletions
  1. 8 0
      packages/l/libvorbis/xmake.lua
  2. 9 0
      packages/o/openal-soft/xmake.lua

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

@@ -12,6 +12,14 @@ package("libvorbis")
 
     add_configs("vorbisenc",  {description = "Includes vorbisenc", default = true, type = "boolean"})
     add_configs("vorbisfile", {description = "Includes vorbisfile", default = true, type = "boolean"})
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::libvorbis")
+    elseif is_host("linux") then
+        add_extsources("pacman::libvorbis", "apt::libvorbis-dev")
+    elseif is_host("macosx") then
+        add_extsources("brew::libvorbis")
+    end
 
     add_deps("cmake", "libogg")
 

+ 9 - 0
packages/o/openal-soft/xmake.lua

@@ -10,6 +10,15 @@ package("openal-soft")
     add_urls("https://github.com/kcat/openal-soft.git")
 
     add_versions("1.21.1", "8ac17e4e3b32c1af3d5508acfffb838640669b4274606b7892aa796ca9d7467f")
+    
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::openal")
+    elseif is_host("linux") then
+        add_extsources("pacman::openal", "apt::libopenal-dev")
+    elseif is_host("macosx") then
+        add_extsources("brew::openal-soft")
+    end
+    
     add_deps("cmake")
 
     if is_plat("windows", "mingw") then