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 17cf303
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions packages/g/gltf-sdk/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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() {
using namespace Microsoft::glTF;
const Color3 c1 = { 0.0f, 0.0f, 0.0f };
Color3 c = c1.ToGamma();
}
]]}, {configs = {languages = "c++14"}, includes = {"GLTFSDK/Color.h"}}))
end)

0 comments on commit 17cf303

Please sign in to comment.