diff --git a/packages/i/imgui/xmake.lua b/packages/i/imgui/xmake.lua index 8fea79b21..6461b681c 100644 --- a/packages/i/imgui/xmake.lua +++ b/packages/i/imgui/xmake.lua @@ -5,6 +5,7 @@ package("imgui") add_urls("https://github.com/ocornut/imgui/archive/$(version).tar.gz", "https://github.com/ocornut/imgui.git") + add_versions("v1.85", "7ed49d1f4573004fa725a70642aaddd3e06bb57fcfe1c1a49ac6574a3e895a77") add_versions("v1.84.2", "35cb5ca0fb42cb77604d4f908553f6ef3346ceec4fcd0189675bdfb764f62b9b") add_versions("v1.84.1", "292ab54cfc328c80d63a3315a242a4785d7c1cf7689fbb3d70da39b34db071ea") add_versions("v1.83-docking", "80b5fb51edba2fd3dea76ec3e88153e2492243d1") diff --git a/packages/s/simage/xmake.lua b/packages/s/simage/xmake.lua new file mode 100644 index 000000000..2bbdfec90 --- /dev/null +++ b/packages/s/simage/xmake.lua @@ -0,0 +1,33 @@ +package("simage") + + set_homepage("https://coin3d.github.io/simage/html/") + set_description("Simage is a library capable of loading, manipulating and saving images, creating and saving movies (AVI and MPEG), and loading audio.") + set_license("MIT") + + add_urls("https://github.com/coin3d/simage/releases/download/v$(version)/simage-$(version)-src.zip") + add_versions("1.8.1", "308a8712c1f28cf6e662acab2e1fdd263fbfcb11323869806f4fef435653d4d3") + + if is_plat("windows") then + add_syslinks("gdiplus") + elseif is_plat("macosx") then + add_frameworks("CoreFoundation", "ApplicationServices") + end + + add_deps("cmake", "zlib", "giflib", "libsndfile", "libpng", "libjpeg-turbo", "libtiff") + on_load("windows", function (package) + package:add("defines", package:config("shared") and "SIMAGE_DLL" or "SIMAGE_NOT_DLL") + end) + + on_install("windows", "macosx", "linux", function (package) + local configs = {"-DSIMAGE_BUILD_EXAMPLES=OFF", "-DSIMAGE_BUILD_TESTS=OFF", "-DSIMAGE_USE_QIMAGE=OFF"} + table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) + table.insert(configs, "-DSIMAGE_BUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) + if package:is_plat("windows") then + table.insert(configs, "-DSIMAGE_USE_MSVC_STATIC_RUNTIME=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF")) + end + import("package.tools.cmake").install(package, configs) + end) + + on_test(function (package) + assert(package:has_cfuncs("simage_read_image", {includes = "simage.h"})) + end)