ruki 5 anos atrás
pai
commit
26623f0923
2 arquivos alterados com 53 adições e 18 exclusões
  1. 19 18
      PKGLIST.md
  2. 34 0
      packages/i/imgui/xmake.lua

+ 19 - 18
PKGLIST.md

@@ -8,24 +8,25 @@
 |cairo|catch2|doctest|cpp-taskflow|bullet3|cpp-taskflow||
 |catch2|concurrentqueue|fmt|doctest|bzip2|doctest||
 |cjson|cpp-taskflow|gtest|fmt|cairo|ffmpeg||
-|concurrentqueue|doctest|inja|gtest|catch2|fmt||
-|cpp-taskflow|expat|libjpeg|inja|cjson|gtest||
-|doctest|fmt|nlohmann_json|json-c|cmake|inja||
-|expat|freeglut|pcre|libcurl|concurrentqueue|json-c||
-|ffmpeg|freetype|pcre2|libev|cpp-taskflow|libjpeg||
-|fmt|glew|spdlog|libffi|doctest|libpng||
-|fontconfig|go|tbox|libjpeg|expat|libuv||
-|freeglut|gtest|xz|libpng|ffmpeg|libxml2||
-|freetype|inja|zlib|libuv|fmt|lua||
-|gettext|libcurl||libxml2|fontconfig|nlohmann_json||
-|glew|libjpeg||nlohmann_json|freetype|spdlog||
-|glib|libpng||spdlog|gettext|tbox||
-|go|libsdl||tbox|glew|zlib||
-|gperf|libtiff||zlib|glib|||
-|gtest|libuv|||go|||
-|icu4c|libwebsockets|||gperf|||
-|inja|lua|||gtest|||
-|json-c|luajit|||icu4c|||
+|concurrentqueue|doctest|imgui|gtest|catch2|fmt||
+|cpp-taskflow|expat|inja|imgui|cjson|gtest||
+|doctest|fmt|libjpeg|inja|cmake|imgui||
+|expat|freeglut|nlohmann_json|json-c|concurrentqueue|inja||
+|ffmpeg|freetype|pcre|libcurl|cpp-taskflow|json-c||
+|fmt|glew|pcre2|libev|doctest|libjpeg||
+|fontconfig|go|spdlog|libffi|expat|libpng||
+|freeglut|gtest|tbox|libjpeg|ffmpeg|libuv||
+|freetype|imgui|xz|libpng|fmt|libxml2||
+|gettext|inja|zlib|libuv|fontconfig|lua||
+|glew|libcurl||libxml2|freetype|nlohmann_json||
+|glib|libjpeg||nlohmann_json|gettext|spdlog||
+|go|libpng||spdlog|glew|tbox||
+|gperf|libsdl||tbox|glib|zlib||
+|gtest|libtiff||zlib|go|||
+|icu4c|libuv|||gperf|||
+|imgui|libwebsockets|||gtest|||
+|inja|lua|||icu4c|||
+|json-c|luajit|||imgui|||
 |libcurl|nana|||inja|||
 |libev|nlohmann_json|||json-c|||
 |libffi|oatpp|||libcurl|||

+ 34 - 0
packages/i/imgui/xmake.lua

@@ -0,0 +1,34 @@
+package("imgui")
+
+    set_homepage("https://github.com/ocornut/imgui")
+    set_description("Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies")
+
+    add_urls("https://github.com/ocornut/imgui/archive/$(version).tar.gz",
+             "https://github.com/ocornut/imgui.git")
+
+    add_versions("v1.75", "1023227fae4cf9c8032f56afcaea8902e9bfaad6d9094d6e48fb8f3903c7b866")
+
+    on_install("macosx", "linux", "windows", "mingw", "android", "iphoneos", function (package)
+        io.writefile("xmake.lua", [[
+            target("imgui")
+                set_kind("static")
+                add_files("*.cpp")
+                add_headerfiles("imgui.h", "imconfig.h")
+        ]])
+        import("package.tools.xmake").install(package)
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            void test() {
+                IMGUI_CHECKVERSION();
+                ImGui::CreateContext();
+                ImGuiIO& io = ImGui::GetIO();
+                ImGui::NewFrame();
+                ImGui::Text("Hello, world!");
+                ImGui::ShowDemoWindow(NULL);
+                ImGui::Render();
+                ImGui::DestroyContext();
+            }
+        ]]}, {configs = {languages = "c++11"}, includes = {"imgui.h"}}))
+    end)