xmake.lua 1.8 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package("hlslpp")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/redorav/hlslpp")
  4. set_description("Math library using hlsl syntax with SSE/NEON support")
  5. set_license("MIT")
  6. add_urls("https://github.com/redorav/hlslpp/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/redorav/hlslpp.git")
  8. add_versions("3.7", "819a3d20e5dcea27ee16903b6c96c309d1432c950f282791c06c8f27c2cb12f0")
  9. add_versions("3.6", "d23b51e631363e7337e89564014fd5a9b7b12498a0296caddcc8433fb23727b8")
  10. add_versions("3.5.3", "9be1b0edcd7877da49e5e85473c83eac792ef10dcccd3f1ff18297f2176ac251")
  11. add_versions("3.5.1", "5f0a89db4b2a8dcf8237463455d6c03e3f9a090117aed2ba07a7309b239bd88c")
  12. add_versions("3.5", "9553e69181a5cff770fe68c2dc5afcda638b290c2e83dca635ed695e01aa16df")
  13. add_versions("3.4", "14541f5350849f04785280add677d7ee4c9a224376e0644beb71318ef18f3531")
  14. add_versions("3.1", "6f933e43bf8150a41d76a188377e59007897dc87e96be30608e7f2007605d5c4")
  15. add_versions("3.2.3", "132149d25306cdc56a87c1d6a4a93d3200de4864b5d27d758d235ce4ace64498")
  16. on_install("linux|!arm64", "macosx", "bsd", "windows", "android", "iphoneos", function (package)
  17. os.cp("include", package:installdir())
  18. end)
  19. on_test(function (package)
  20. assert(package:check_cxxsnippets({test = [[
  21. void test() {
  22. using namespace hlslpp;
  23. float4 foo4 = float4(1, 2, 3, 4);
  24. float4x4 fooMatrix4x4 = float4x4( 1, 2, 3, 4,
  25. 5, 6, 7, 8,
  26. 8, 7, 6, 5,
  27. 4, 3, 2, 1);
  28. float4 myTransformedVector = mul(fooMatrix4x4, foo4);
  29. }
  30. ]]}, {configs = {languages = "c++14"}, includes = "hlsl++.h"}))
  31. end)