Skip to content

Commit bee9c1a

Browse files
committed
imgui-sfml: fix imgui dependency version (#8605)
1 parent dafb8c6 commit bee9c1a

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

packages/i/imgui-sfml/xmake.lua

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ package("imgui-sfml")
1111
add_versions("v2.5", "3775c9303f656297f2392e91ffae2021e874ee319b4139c60076d6f757ede109")
1212

1313
add_deps("cmake")
14-
add_deps("imgui")
1514
add_deps("opengl", {optional = true})
1615

1716
if is_plat("windows", "mingw") then
@@ -21,6 +20,11 @@ package("imgui-sfml")
2120
add_links("ImGui-SFML")
2221

2322
on_load(function(package)
23+
if package:version():eq("v3.0") then
24+
package:add("deps", "imgui >=1.91.1 <=1.91.9")
25+
else
26+
package:add("deps", "imgui")
27+
end
2428
if package:is_plat("linux") and package:config("shared") then
2529
package:add("deps", "sfml", {configs = {shared = true}})
2630
else
@@ -32,9 +36,13 @@ package("imgui-sfml")
3236
end)
3337

3438
on_install("macosx", "linux", "windows", "mingw", function (package)
35-
io.writefile("xmake.lua", [[
39+
local imgui_version = ""
40+
if package:version():eq("v3.0") then
41+
imgui_version = " >=1.91.1 <=1.91.9"
42+
end
43+
io.writefile("xmake.lua", string.format([[
3644
add_rules("mode.release", "mode.debug")
37-
add_requires("imgui")
45+
add_requires("imgui%s")
3846
if is_plat("linux") and is_kind("shared") then
3947
add_requires("sfml", {configs = {shared = true}})
4048
else
@@ -57,7 +65,7 @@ package("imgui-sfml")
5765
end
5866
add_rules("utils.install.pkgconfig_importfiles")
5967
add_rules("utils.install.cmake_importfiles")
60-
]])
68+
]], imgui_version))
6169
local configs = {}
6270
if package:config("shared") then
6371
configs.kind = "shared"

0 commit comments

Comments
 (0)