Browse Source

Add ImGuizmo and update ImGui (#713)

* Add ImGuizmo and update ImGui

* remove forgotten line

* Update xmake.lua

Co-authored-by: ruki <[email protected]>
TNtube 3 years ago
parent
commit
e05260e7b9
2 changed files with 27 additions and 1 deletions
  1. 3 1
      packages/i/imgui/xmake.lua
  2. 24 0
      packages/i/imguizmo/xmake.lua

+ 3 - 1
packages/i/imgui/xmake.lua

@@ -5,6 +5,8 @@ package("imgui")
 
     add_urls("https://github.com/ocornut/imgui/archive/$(version).tar.gz",
              "https://github.com/ocornut/imgui.git")
+
+    add_versions("v1.85-docking", "dc8c3618e8f8e2dada23daa1aa237626af341fd8")
     add_versions("v1.85", "7ed49d1f4573004fa725a70642aaddd3e06bb57fcfe1c1a49ac6574a3e895a77")
     add_versions("v1.84.2", "35cb5ca0fb42cb77604d4f908553f6ef3346ceec4fcd0189675bdfb764f62b9b")
     add_versions("v1.84.1", "292ab54cfc328c80d63a3315a242a4785d7c1cf7689fbb3d70da39b34db071ea")
@@ -68,7 +70,7 @@ package("imgui")
                 target("imgui")
                     set_kind("static")
                     add_files("*.cpp")
-                    add_headerfiles("imgui.h", "imconfig.h")
+                    add_headerfiles("*.h")
             ]]
         end
 

+ 24 - 0
packages/i/imguizmo/xmake.lua

@@ -0,0 +1,24 @@
+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")
+
+    add_urls("https://github.com/CedricGuillemet/ImGuizmo/archive/$(version).tar.gz",
+                 "https://github.com/CedricGuillemet/ImGuizmo.git")
+
+    add_versions("1.83", "e6d05c5ebde802df7f6c342a06bc675bd2aa1c754d2d96755399a182187098a8")
+
+    on_install("macosx", "linux", "windows", "mingw", "android", "iphoneos", function (package)
+            local xmake_lua = [[
+                add_rules("mode.debug", "mode.release")
+                add_requires("imgui v1.83")
+
+                target("imguizmo")
+                    set_kind("static")
+                    add_files("*.cpp")
+                    add_headerfiles("*.h")
+                    add_packages("imgui")
+            ]]
+            io.writefile("xmake.lua", xmake_lua)
+            import("package.tools.xmake").install(package)
+        end)