Skip to content

bgfx: update to 9392 and support MD runtime - #10584

Open
FFFelian wants to merge 15 commits into
xmake-io:devfrom
FFFelian:bgfx
Open

bgfx: update to 9392 and support MD runtime#10584
FFFelian wants to merge 15 commits into
xmake-io:devfrom
FFFelian:bgfx

Conversation

@FFFelian

@FFFelian FFFelian commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

* update to 9392 and replacebgfx::init()with bgfx::init(init) since the default argument was removed in 9392 .
* add support to MD/MDd runtime by passing --with-dynamic-runtime.

@FFFelian

FFFelian commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

我看最新genie 1204已经可以处理vs2026了, 改成add_deps("genie 1204"), 去掉if tonumber(vs) >= 2022是不是也行

Comment thread packages/b/bgfx/xmake.lua
Comment on lines -80 to +88
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"))
os.trycp("../../*_vs*/bin/*.lib|*example*", package:installdir("lib"))
os.trycp("../../*_vs*/bin/*.dll", package:installdir("lib"))
os.trycp("../../*_vs*/bin/*.lib", package:installdir("lib"))
os.trycp("../../*_vs*/bin/*.exe", package:installdir("bin"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to work with old versions of bgfx?

Comment thread packages/b/bgfx/xmake.lua
Comment on lines +124 to +126
if package:version() and package:version():ge("9392") and package:is_plat("iphoneos") then
io.replace("scripts/bgfx.lua", 'configuration { "osx*" }', 'configuration { "ios*" }\n\t\tbuildoptions { "-x objective-c++" }\n\tconfiguration { "osx*" }', {plain = true})
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try delete it maybe it would work without this, since we updated genie.

Comment thread packages/b/bgfx/xmake.lua
end

add_deps("genie")
add_deps("genie 1204")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can keep it as is "genie" it should acquire newest?

Comment thread packages/b/bgfx/xmake.lua
table.insert(configs, "/p:Platform=" .. (package:is_arch("x64") and "x64" or "Win32"))
table.insert(configs, "bgfx.sln")
table.insert(configs, "/p:Platform=" .. (package:is_arch("x64") and "x64" or (package:is_arch("arm64") and "ARM64" or (package:is_arch("arm") and "ARM" or "Win32"))))
table.insert(configs, tonumber(msvc:config("vs")) >= 2026 and "bgfx.slnx" or "bgfx.sln")

@luadebug luadebug Aug 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it going to work with old versions of bgfx? As I'm not sure old ones provide .slnx

Comment thread packages/b/bgfx/xmake.lua
envs.BIMG_DIR = bimgdir

if package:is_plat("windows") and package:is_arch("arm64") then
os.rm("3rdparty/glsl-optimizer/include/c99/stdint.h")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better to place os.tryrm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants