xmake.lua 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package("dlss")
  2. set_homepage("https://github.com/NVIDIA/DLSS")
  3. set_description("NVIDIA DLSS is a new and improved deep learning neural network that boosts frame rates and generates beautiful, sharp images for your games")
  4. set_license("NVIDIA RTX SDKs")
  5. add_urls("https://github.com/NVIDIA/DLSS/archive/refs/tags/$(version).tar.gz",
  6. "https://github.com/NVIDIA/DLSS.git", {submodules = false})
  7. add_versions("v310.2.1", "1aa9e6bbb68507a7eed2ec3eaed842ced08d3036018c3d9ee2297fbd6aa460e6")
  8. add_versions("v310.1.0", "f042769df59a3f4a5f80421e60d848d26d4f8a7c4848da410507fc07e50522f4")
  9. add_versions("v3.7.20", "904d771551526dd6aa458f0db7b85fe4abb8f49ce0307d377e8da089628bf9ec")
  10. set_policy("package.precompiled", false)
  11. on_install("windows|x64", "linux|x86_64", function (package)
  12. os.cp("include", package:installdir())
  13. if is_plat("windows") then
  14. if package:version() and package:version():ge("310.1.0") then
  15. os.cp("lib/Windows_x86_64/x64/*.lib", package:installdir("lib"))
  16. else
  17. os.cp("lib/Windows_x86_64/x86_64/*.lib", package:installdir("lib"))
  18. end
  19. if package:is_debug() then
  20. os.cp("lib/Windows_x86_64/dev/*", package:installdir("bin"))
  21. else
  22. os.cp("lib/Windows_x86_64/rel/*", package:installdir("bin"))
  23. end
  24. else
  25. package:add("syslinks", "dl")
  26. os.cp("lib/Linux_x86_64/*.a", package:installdir("lib"))
  27. if package:is_debug() then
  28. os.cp("lib/Linux_x86_64/dev/*", package:installdir("lib"))
  29. else
  30. os.cp("lib/Linux_x86_64/rel/*", package:installdir("lib"))
  31. end
  32. end
  33. end)
  34. on_test(function (package)
  35. assert(package:has_cfuncs("NGX_DLSS_GET_STATS_2", {includes = "nvsdk_ngx_helpers.h"}))
  36. end)