xmake.lua 908 B

123456789101112131415161718192021222324
  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_deps("stb", "nlohmann_json")
  10. on_install(function (package)
  11. os.cp("tiny_gltf.h", package:installdir("include"))
  12. os.cp("cmake/TinyGLTFConfig.cmake", package:installdir("cmake"))
  13. end)
  14. on_test(function (package)
  15. assert(package:check_cxxsnippets({test = [[
  16. void test() {
  17. tinygltf::TinyGLTF loader;
  18. }
  19. ]]}, {configs = {languages = "c++14"}, includes = "tiny_gltf.h"}))
  20. end)