Skip to content

Commit

Permalink
Update vk bootstrap and imgui (#3140)
Browse files Browse the repository at this point in the history
* update vk-bootstrap to v1.3.275

* add vk-bootstrap v1.3.268

* update imgui to v1.90.1

* vk-bootstrap handle null from `version()`

* vk-bootstrap handle null from `version()`

* vk-bootstrap handle null from `version()`
  • Loading branch information
Latias94 authored Jan 22, 2024
1 parent 7af70aa commit ed63b06
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/i/imgui/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ package("imgui")

add_urls("https://github.com/ocornut/imgui/archive/refs/tags/$(version).tar.gz",
"https://github.com/ocornut/imgui.git")
add_versions("v1.90.1-docking", "v1.90.1-docking")
add_versions("v1.90.1", "21dcc985bb2ae8fe48047c86135dbc438d6980a8f2e08babbda5be820592f282")
add_versions("v1.90-docking", "v1.90-docking")
add_versions("v1.90", "170986e6a4b83d165bfc1d33c2c5a5bc2d67e5b97176287485c51a2299249296")
add_versions("v1.89.9-docking", "v1.89.9-docking")
Expand Down
20 changes: 18 additions & 2 deletions packages/v/vk-bootstrap/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ package("vk-bootstrap")
add_versions("v0.5", "7ec1017d71d48595c078a4488140b230fd9cad1059986a18a507f356bf00e89b")
add_versions("v0.6", "95dedaa5cedf7a271f051d91b24b3b6c78aa3c5b2bc3cf058554c92748a421b2")
add_versions("v0.7", "7b2c30a4c46514cc5b20d2bebab25c495df39574b9e117c760d1cfe19f71d9aa")
add_versions("v1.3.268", "028300b0dac2dfaf193ca95d2ecd46a450f6da31095a09334c4c3b76c561714c")
add_versions("v1.3.275", "33737a731e8b3a4539812e63502ea55dffb3dbc7331b44c4cc0902fbf797f5ff")

add_deps("vulkan-headers")

Expand All @@ -19,12 +21,19 @@ package("vk-bootstrap")
end

on_install("windows", "linux", "macosx", function (package)
local version = package:version()
local language_version
if not version or version:ge("1.3.270") then
language_version = "cxx17"
else
language_version = "cxx14"
end
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
add_requires("vulkan-headers")
target("vk-bootstrap")
set_kind("static")
set_languages("cxx14")
]] .. "set_languages(\"" .. language_version .. "\")" .. [[
add_files("src/VkBootstrap.cpp")
add_headerfiles("src/VkBootstrap.h")
add_headerfiles("src/VkBootstrapDispatch.h")
Expand All @@ -37,11 +46,18 @@ package("vk-bootstrap")
end)

on_test(function (package)
local configs = {}
local version = package:version()
if not version or version:ge("1.3.270") then
configs.languages = "cxx17"
else
configs.languages = "cxx14"
end
assert(package:check_cxxsnippets({test = [[
vkb::InstanceBuilder builder;
auto inst_ret = builder.set_app_name ("Example Vulkan Application")
.request_validation_layers ()
.use_default_debug_messenger ()
.build ();
]]}, {configs = {languages = "cxx14"}, includes = "VkBootstrap.h"}))
]]}, {configs = configs, includes = "VkBootstrap.h"}))
end)

0 comments on commit ed63b06

Please sign in to comment.