2
0
Эх сурвалжийг харах

bgfx - dynamic libs on macosx are called .dylib instead of .so... (#1310)

* bgfx - dynalic libs on macosx are called .dylib instead of .so...

* Update xmake.lua

Co-authored-by: ruki <[email protected]>
FranekStratovarius 3 жил өмнө
parent
commit
9306ce554c

+ 4 - 9
packages/b/bgfx/xmake.lua

@@ -20,6 +20,8 @@ package("bgfx")
         add_syslinks("GL", "pthread", "dl")
     end
 
+    add_deps("genie")
+
     on_load("windows", "macosx", "linux", function (package)
         local suffix = package:debug() and "Debug" or "Release"
         for _, lib in ipairs({"bgfx", "bimg", "bx"}) do
@@ -30,14 +32,7 @@ package("bgfx")
     on_install("windows", "macosx", "linux", function (package)
         local bxdir = package:resourcefile("bx")
         local bimgdir = package:resourcefile("bimg")
-        local genie = path.join(bxdir, "tools", "bin")
-        if is_host("windows") then
-            genie = path.join(genie, "windows", "genie.exe")
-        elseif is_host("macosx") then
-            genie = path.join(genie, "darwin", "genie")
-        elseif is_host("linux") then
-            genie = path.join(genie, "linux", "genie")
-        end
+        local genie = is_host("windows") and "genie.exe" or "genie"
 
         local args = {"--with-tools"}
         if package:config("shared") then
@@ -99,7 +94,7 @@ package("bgfx")
 
             if package:is_plat("macosx") then
                 os.trycp(".build/" .. target .. "/bin/*.a|*example*", package:installdir("lib"))
-                os.trycp(".build/" .. target .. "/bin/*.so", package:installdir("lib"))
+                os.trycp(".build/" .. target .. "/bin/*.dylib", package:installdir("lib"))
                 os.trycp(".build/" .. target .. "/bin/*|.build/*.*", package:installdir("bin"))
             elseif package:is_plat("linux") then
                 os.trycp(".build/" .. target .. "/bin/*.a|*example*", package:installdir("lib"))