xmake.lua 1003 B

12345678910111213141516171819202122232425
  1. package("tinygltf")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/syoyo/tinygltf/")
  4. set_description("Header only C++11 tiny glTF 2.0 library")
  5. set_license("MIT")
  6. add_urls("https://github.com/syoyo/tinygltf/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/syoyo/tinygltf.git")
  8. add_versions("v2.5.0", "5d85bd556b60b1b69527189293cfa4902957d67fabb8582b6532f23a5ef27ec1")
  9. add_versions("v2.6.3", "f61e4a501baa7fbf31b18ea0f6815a59204ad0de281f7b04f0168f6bbd17c340")
  10. add_deps("stb", "nlohmann_json")
  11. on_install(function (package)
  12. os.cp("tiny_gltf.h", package:installdir("include"))
  13. os.cp("cmake/TinyGLTFConfig.cmake", package:installdir("cmake"))
  14. end)
  15. on_test(function (package)
  16. assert(package:check_cxxsnippets({test = [[
  17. void test() {
  18. tinygltf::TinyGLTF loader;
  19. }
  20. ]]}, {configs = {languages = "c++14"}, includes = "tiny_gltf.h"}))
  21. end)