xmake.lua 1.2 KB

12345678910111213141516171819202122232425262728
  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. add_versions("3.1", "6f933e43bf8150a41d76a188377e59007897dc87e96be30608e7f2007605d5c4")
  8. add_versions("3.2.3", "132149d25306cdc56a87c1d6a4a93d3200de4864b5d27d758d235ce4ace64498")
  9. on_install("linux", "macosx", "bsd", "windows", "android", "iphoneos", function (package)
  10. os.cp("include", package:installdir())
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. void test() {
  15. using namespace hlslpp;
  16. float4 foo4 = float4(1, 2, 3, 4);
  17. float4x4 fooMatrix4x4 = float4x4( 1, 2, 3, 4,
  18. 5, 6, 7, 8,
  19. 8, 7, 6, 5,
  20. 4, 3, 2, 1);
  21. float4 myTransformedVector = mul(fooMatrix4x4, foo4);
  22. }
  23. ]]}, {configs = {languages = "c++14"}, includes = "hlsl++.h"}))
  24. end)