xmake.lua 1.1 KB

1234567891011121314151617181920212223242526
  1. package("gpujpeg")
  2. set_homepage("https://github.com/CESNET/GPUJPEG")
  3. set_description("JPEG encoder and decoder library and console application for NVIDIA GPUs from CESNET and SITOLA of Faculty of Informatics at Masaryk University.")
  4. add_urls("https://github.com/CESNET/GPUJPEG/archive/refs/tags/$(version).tar.gz",
  5. "https://github.com/CESNET/GPUJPEG.git")
  6. add_versions("continuous", "02be161bb8eca4479f186c700d96275784da200341b7dc67d60714e484af9cee")
  7. add_deps("cmake")
  8. add_deps("cuda", {system = true})
  9. on_install("linux", function (package)
  10. local configs = {}
  11. table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
  12. table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
  13. import("package.tools.cmake").install(package, configs)
  14. end)
  15. on_test(function (package)
  16. assert(package:check_csnippets({test = [[
  17. void test() {
  18. struct gpujpeg_parameters param;
  19. gpujpeg_set_default_parameters(&param);
  20. }
  21. ]]}, {includes = {"libgpujpeg/gpujpeg.h"}}))
  22. end)