From 8d8bb747f5a313e2a60489a3a30c094d08b6d1af Mon Sep 17 00:00:00 2001 From: FranekStratovarius <32364106+FranekStratovarius@users.noreply.github.com> Date: Fri, 17 Jun 2022 15:47:06 +0200 Subject: [PATCH] added building of shared libs to bgfx (#1273) * added building of shared libs to bgfx * Update xmake.lua Co-authored-by: ruki --- packages/b/bgfx/xmake.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/b/bgfx/xmake.lua b/packages/b/bgfx/xmake.lua index aa80a5c6b..ed5629f64 100644 --- a/packages/b/bgfx/xmake.lua +++ b/packages/b/bgfx/xmake.lua @@ -40,6 +40,9 @@ package("bgfx") end local args = {"--with-tools"} + if package:config("shared") then + table.insert(args, "--with-shared-lib") + end os.trycp(path.join("include", "bgfx"), package:installdir("include")) os.trycp(path.join(bxdir, "include", "*"), package:installdir("include")) os.trycp(path.join(bimgdir, "include", "*"), package:installdir("include")) @@ -65,6 +68,8 @@ package("bgfx") msbuild.build(package, configs) os.trycp("../../win*_vs*/bin/*.lib|*example*", package:installdir("lib")) + os.trycp("../../win*_vs*/bin/*.dll", package:installdir("lib")) + os.trycp("../../win*_vs*/bin/*.lib", package:installdir("lib")) os.trycp("../../win*_vs*/bin/*.exe", package:installdir("bin")) else import("package.tools.make") @@ -94,9 +99,11 @@ 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/*|.build/*.*", package:installdir("bin")) elseif package:is_plat("linux") 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/*|.build/*.*", package:installdir("bin")) end end