-
-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add microsoft gltf-sdk #6159
base: dev
Are you sure you want to change the base?
Add microsoft gltf-sdk #6159
Conversation
|
local configs = { | ||
"-DENABLE_UNIT_TESTS=OFF", | ||
"-DENABLE_SAMPLES=OFF", | ||
"-DRAPIDJSON_BUILD_DOC=OFF", | ||
"-DRAPIDJSON_BUILD_EXAMPLES=OFF", | ||
"-DRAPIDJSON_BUILD_TESTS=OFF", | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local configs = { | |
"-DENABLE_UNIT_TESTS=OFF", | |
"-DENABLE_SAMPLES=OFF", | |
"-DRAPIDJSON_BUILD_DOC=OFF", | |
"-DRAPIDJSON_BUILD_EXAMPLES=OFF", | |
"-DRAPIDJSON_BUILD_TESTS=OFF", | |
} | |
os.rm("External") | |
io.replace("Build/CMake/Modules/GLTFPlatform.cmake", "elseif (MSVC)", "elseif (MSVC OR MINGW)", {plain = true}) | |
io.replace("Build/CMake/Modules/GLTFPlatform.cmake", "install(FILES ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${PROJECT_NAME}.pdb DESTINATION ${CMAKE_SOURCE_DIR}/Built/Out/${platform}/$<CONFIG>/${PROJECT_NAME})", "", {plain = true}) | |
io.replace("Build/CMake/Modules/GLTFPlatform.cmake", "${CMAKE_SOURCE_DIR}/Built/Out/${platform}/$<CONFIG>/${PROJECT_NAME}", "lib", {plain = true}) | |
io.replace("GLTFSDK/CMakeLists.txt", | |
"CreateGLTFInstallTargets(GLTFSDK ${Platform})", | |
"CreateGLTFInstallTargets(GLTFSDK ${Platform})\ninstall(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Inc/GLTFSDK DESTINATION ${CMAKE_INSTALL_PREFIX}/include)", {plain = true}) | |
io.replace("CMakeLists.txt", "/MP", "", {plain = true}) | |
io.replace("CMakeLists.txt", "if(NOT IOS)", "if(1)", {plain = true}) | |
io.replace("CMakeLists.txt", "if(NOT RapidJSON_FOUND)", "if(0)", {plain = true}) | |
io.replace("CMakeLists.txt", "find_package(GTest CONFIG)", "", {plain = true}) | |
io.replace("CMakeLists.txt", "if(NOT GTest_FOUND)", "if(0)", {plain = true}) | |
local configs = { | |
"-DENABLE_UNIT_TESTS=OFF", | |
"-DENABLE_SAMPLES=OFF", | |
} |
Dunno seems its good to limit linux because it uses powershell OR MAYBE EVEN MORE IDK.
find_program(POWERSHELL_PATH NAMES pwsh powershell NO_PACKAGE_ROOT_PATH NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/GeneratedFiles/SchemaJson.h
COMMAND ${POWERSHELL_PATH}
But we can make binary package of this maybe? https://github.com/PowerShell/PowerShell/releases/tag/v7.4.6
Or using existing grabbing mechanism from nuget, but im not sure it will be fine for linux and others %_%
https://www.nuget.org/packages/PowerShell/#supportedframeworks-body-tab
Yet without pwsh/powershell packaged its
on_install("windows", "mingw@windows,msys", function (package)
I believe...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use binary package for windows. but only for windows. There will be compatibility issues on Linux
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion, I will take a look.
Add https://github.com/microsoft/glTF-SDK , could be useful to game developers.
However I need some help as I don't know why the test fails, cc @star-hengxing