added building of shared libs to bgfx (#1273)

* added building of shared libs to bgfx

* Update xmake.lua

Co-authored-by: ruki <waruqi@gmail.com>
pull/1279/head
FranekStratovarius 2 years ago committed by GitHub
parent 306082cd05
commit 8d8bb747f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      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

Loading…
Cancel
Save