2
0

xmake.lua 985 B

123456789101112131415161718192021222324252627
  1. package("libnest2d")
  2. set_homepage("https://github.com/tamasmeszaros/libnest2d")
  3. set_description("2D irregular bin packaging and nesting library written in modern C++")
  4. set_license("LGPL-3.0")
  5. add_urls("https://github.com/tamasmeszaros/libnest2d.git")
  6. add_versions("2022.11.16", "663daa69e1d7478669f714218e27681edbc96640")
  7. add_defines("LIBNEST2D_GEOMETRIES_clipper", "LIBNEST2D_OPTIMIZER_nlopt")
  8. add_deps("nlopt", "polyclipping", "boost")
  9. on_install("linux", "windows", "macosx", function (package)
  10. os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
  11. import("package.tools.xmake").install(package)
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. #include <libnest2d/libnest2d.hpp>
  16. void test() {
  17. using namespace libnest2d;
  18. Degrees deg(180);
  19. }
  20. ]]}, {configs = {languages = "cxx14"}}))
  21. end)