xmake.lua 1.1 KB

12345678910111213141516171819202122232425262728
  1. package("pqp")
  2. set_homepage("http://gamma.cs.unc.edu/SSV/")
  3. set_description("A Proximity Query Package")
  4. set_urls("http://gamma.cs.unc.edu/software/downloads/SSV/pqp-$(version).tar.gz",
  5. "https://github.com/GammaUNC/PQP.git")
  6. add_versions("1.3", "00bdcb380206393349ed7ee9a773f894bf796059c66cec0d97c0a93649eb012f")
  7. add_patches("1.3", path.join(os.scriptdir(), "patches", "1.3", "fix.patch"), "9160f8bc35d23dd5a84af0891410fafa07b8fd9329389724627a68e96b4c270f")
  8. on_install(function (package)
  9. io.writefile("xmake.lua", [[
  10. add_rules("mode.debug", "mode.release")
  11. target("pqp")
  12. set_kind("$(kind)")
  13. add_files("**/src/*.cpp")
  14. add_headerfiles("**/src/*.h")
  15. ]])
  16. local configs = {}
  17. configs.kind = package:config("shared") and "shared" or "static"
  18. import("package.tools.xmake").install(package, configs)
  19. end)
  20. on_test(function (package)
  21. assert(package:has_cxxfuncs("PQP_Collide", {includes = "PQP.h"}))
  22. assert(package:has_cxxfuncs("TriDist", {includes = "TriDist.h"}))
  23. end)