From 9306ce554c863223a9751eb071b824e4d58987b9 Mon Sep 17 00:00:00 2001 From: FranekStratovarius <32364106+FranekStratovarius@users.noreply.github.com> Date: Sun, 26 Jun 2022 16:46:25 -0700 Subject: [PATCH] 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 --- packages/b/bgfx/xmake.lua | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/b/bgfx/xmake.lua b/packages/b/bgfx/xmake.lua index ed5629f64..f74b505bc 100644 --- a/packages/b/bgfx/xmake.lua +++ b/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"))