Skip to content

Commit

Permalink
Add microsoft gltf-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjtxietian committed Jan 13, 2025
1 parent 53bb788 commit 0ef7679
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions packages/g/gltf-sdk/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package("gltf-sdk")
set_homepage("https://github.com/microsoft/glTF-SDK")
set_description("glTF-SDK is a C++ Software Development Kit for glTF (GL Transmission Format -https://github.com/KhronosGroup/glTF).")
set_license("MIT")

add_urls("https://github.com/microsoft/glTF-SDK/archive/refs/tags/$(version).tar.gz",
"https://github.com/microsoft/glTF-SDK.git")

add_versions("r1.9.6.0", "f3049d2b8ecebb914f634496918ab645f7ce452a67a5b4210e7354dc7c0059ab")

add_deps("cmake")

on_install(function (package)
local configs = {
"-DENABLE_UNIT_TESTS=OFF",
"-DENABLE_SAMPLES=OFF",
"-DRAPIDJSON_BUILD_DOC=OFF",
"-DRAPIDJSON_BUILD_EXAMPLES=OFF",
"-DRAPIDJSON_BUILD_TESTS=OFF",
}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
-- table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
int x = Microsoft::glTF::GLB_HEADER_BYTE_SIZE;
}
]]}, {configs = {languages = "c++14"}, includes = {"GLTFSDK/Constants.h"}}))
end)

0 comments on commit 0ef7679

Please sign in to comment.