From fc458e906383befa05fda645a377917b00db9eab Mon Sep 17 00:00:00 2001 From: wuxing Date: Thu, 12 May 2022 08:21:04 +0800 Subject: [PATCH] add gpujpeg (#1214) * add gpujpeg * xmake require gpujpeg only support linux now --- packages/g/gpujpeg/xmake.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 packages/g/gpujpeg/xmake.lua diff --git a/packages/g/gpujpeg/xmake.lua b/packages/g/gpujpeg/xmake.lua new file mode 100644 index 000000000..77dd2c977 --- /dev/null +++ b/packages/g/gpujpeg/xmake.lua @@ -0,0 +1,26 @@ +package("gpujpeg") + set_homepage("https://github.com/CESNET/GPUJPEG") + set_description("JPEG encoder and decoder library and console application for NVIDIA GPUs from CESNET and SITOLA of Faculty of Informatics at Masaryk University.") + + add_urls("https://github.com/CESNET/GPUJPEG/archive/refs/tags/$(version).tar.gz", + "https://github.com/CESNET/GPUJPEG.git") + add_versions("continuous", "02be161bb8eca4479f186c700d96275784da200341b7dc67d60714e484af9cee") + + add_deps("cmake") + add_deps("cuda", {system = true}) + + on_install("linux", function (package) + local configs = {} + table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) + table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) + import("package.tools.cmake").install(package, configs) + end) + + on_test(function (package) + assert(package:check_csnippets({test = [[ + void test() { + struct gpujpeg_parameters param; + gpujpeg_set_default_parameters(¶m); + } + ]]}, {includes = {"libgpujpeg/gpujpeg.h"}})) + end)