Skip to content

Commit

Permalink
update imguizmo (#5559)
Browse files Browse the repository at this point in the history
* update imguizmo

* use lower case

* add restrict to imgui version

* specify max version
  • Loading branch information
xq114 authored Oct 25, 2024
1 parent 1784650 commit 44bbf1d
Showing 1 changed file with 31 additions and 25 deletions.
56 changes: 31 additions & 25 deletions packages/i/imguizmo/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,42 @@ package("imguizmo")

set_homepage("https://github.com/CedricGuillemet/ImGuizmo")
set_description("Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui")
set_license("MIT")

add_urls("https://github.com/CedricGuillemet/ImGuizmo.git")
add_versions("1.83", "664cf2d73864a36b2a8b5091d33fc4578c885eca")
add_versions("1.89+WIP", "82e2465b8d029e2d85002905cc4ed5087e2119fe")


add_deps("imgui")
add_versions("1.89+wip", "82e2465b8d029e2d85002905cc4ed5087e2119fe")
add_versions("1.91.3+wip", "bcdd86bb8a8019b373e46921c52ef7f2fdaa8b16")

on_load(function (package)
if package:version():lt("1.90") then
package:add("deps", "imgui <=1.89.3")
else
package:add("deps", "imgui")
end
end)

on_install("macosx", "linux", "windows", "mingw", "android", "iphoneos", function (package)
local imgui = package:dep("imgui")
local configs = imgui:requireinfo().configs
if configs then
configs = string.serialize(configs, {strip = true, indent = false})
end
local xmake_lua = ([[
add_rules("mode.debug", "mode.release")
set_languages("c++14")
add_requires("imgui %s", {configs = %s})
target("imguizmo")
set_kind("static")
add_files("*.cpp")
add_headerfiles("*.h")
add_packages("imgui")
]]):format(imgui:version_str(), configs)
io.writefile("xmake.lua", xmake_lua)
import("package.tools.xmake").install(package)
end)
local imgui = package:dep("imgui")
local configs = imgui:requireinfo().configs
if configs then
configs = string.serialize(configs, {strip = true, indent = false})
end
local xmake_lua = ([[
add_rules("mode.debug", "mode.release")
set_languages("c++14")
add_requires("imgui %s", {configs = %s})
target("imguizmo")
set_kind("static")
add_files("*.cpp")
add_headerfiles("*.h")
add_packages("imgui")
]]):format(imgui:version_str(), configs)
io.writefile("xmake.lua", xmake_lua)
import("package.tools.xmake").install(package)
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
Expand All @@ -40,4 +47,3 @@ package("imguizmo")
}
]]}, {configs = {languages = "c++11"}, includes = {"imgui.h", "ImGuizmo.h"}}))
end)

0 comments on commit 44bbf1d

Please sign in to comment.