xmake.lua 1.0 KB

123456789101112131415161718192021222324252627282930
  1. package("gaussianlib")
  2. set_kind("library", {headeronly = true})
  3. set_description("Basic linear algebra C++ library for 2D and 3D applications")
  4. set_homepage("https://github.com/LukasBanana/GaussianLib")
  5. set_license("BSD-3-Clause")
  6. add_urls("https://github.com/LukasBanana/GaussianLib.git")
  7. add_versions("2024.12.31", "d988f87f2bb20a3c41fa1f20c2d0f132ae7545c5")
  8. on_install(function (package)
  9. os.cp("include", package:installdir())
  10. end)
  11. on_test(function (package)
  12. assert(package:check_cxxsnippets({test = [[
  13. #include <Gauss/Gauss.h>
  14. #include <iostream>
  15. static const Gs::Real pi = Gs::Real(3.141592654);
  16. void test() {
  17. Gs::Vector4 a(1, 2, 3, 4), b(-12, 0.5f, 0, 1);
  18. const Gs::Vector2 c(42, 19);
  19. Gs::Matrix<double, 3, 4> A;
  20. Gs::Matrix<double, 4, 3> B;
  21. }
  22. ]]}, {configs = {languages = "cxx11"}}))
  23. end)