xmake.lua 1.1 KB

1234567891011121314151617181920212223242526272829
  1. package("tinyply")
  2. set_homepage("https://github.com/ddiakopoulos/tinyply")
  3. set_description("C++11 ply 3d mesh format importer & exporter")
  4. set_license("BSD-2-Clause")
  5. add_urls("https://github.com/ddiakopoulos/tinyply/archive/$(version).tar.gz")
  6. add_urls("https://github.com/ddiakopoulos/tinyply.git")
  7. add_versions("2.3.4", "1bb1462727a363f7b77a10e51cd023095db7b281d2f201167620a83e495513c6")
  8. on_install("macosx", "linux", "windows", "mingw", "android", "iphoneos", function (package)
  9. io.writefile("xmake.lua", [[
  10. add_rules("mode.debug", "mode.release")
  11. target("tinyply")
  12. set_kind("$(kind)")
  13. set_languages("c++11")
  14. add_files("source/tinyply.cpp")
  15. add_headerfiles("source/tinyply.h")
  16. ]])
  17. import("package.tools.xmake").install(package)
  18. end)
  19. on_test(function (package)
  20. assert(package:check_cxxsnippets({test = [[
  21. void test() {
  22. tinyply::PlyFile plyFile;
  23. }
  24. ]]}, {configs = {languages = "c++11"}, includes = "tinyply.h"}))
  25. end)