xmake.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. option("cuda", {default = false})
  2. option("dx11", {default = false})
  3. option("dx12", {default = false})
  4. option("opengl", {default = false})
  5. option("metal", {default = false})
  6. add_rules("mode.release", "mode.debug")
  7. target("remotery")
  8. set_kind("$(kind)")
  9. add_files("lib/Remotery.c")
  10. if is_plat("macosx", "iphoneos") then
  11. add_files("lib/Remotery.mm")
  12. end
  13. add_headerfiles("lib/Remotery.h")
  14. if has_config("cuda") then
  15. add_defines("RMT_USE_CUDA=1")
  16. end
  17. if has_config("dx11") then
  18. add_defines("RMT_USE_D3D11=1")
  19. end
  20. if has_config("dx12") then
  21. add_defines("RMT_USE_D3D12=1")
  22. end
  23. if has_config("opengl") then
  24. add_defines("RMT_USE_OPENGL=1")
  25. end
  26. if has_config("metal") then
  27. add_defines("RMT_USE_METAL=1")
  28. end
  29. if is_plat("windows", "mingw") then
  30. add_syslinks("ws2_32", "winmm")
  31. if is_plat("windows") and is_kind("shared") then
  32. add_rules("utils.symbols.export_all")
  33. end
  34. elseif is_plat("linux", "bsd") then
  35. add_syslinks("pthread", "m")
  36. end