early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,66 @@
diff --git a/GLTFSDK.Samples/CMakeLists.txt b/GLTFSDK.Samples/CMakeLists.txt
index a66ed93..d948ee2 100644
--- a/GLTFSDK.Samples/CMakeLists.txt
+++ b/GLTFSDK.Samples/CMakeLists.txt
@@ -1,4 +1,6 @@
cmake_minimum_required(VERSION 3.5)
-
+if(APPLE)
+ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
+endif()
add_subdirectory(Deserialize)
add_subdirectory(Serialize)
diff --git a/GLTFSDK.Samples/Deserialize/CMakeLists.txt b/GLTFSDK.Samples/Deserialize/CMakeLists.txt
index 791898c..6474aee 100644
--- a/GLTFSDK.Samples/Deserialize/CMakeLists.txt
+++ b/GLTFSDK.Samples/Deserialize/CMakeLists.txt
@@ -17,6 +17,8 @@ if (MSVC)
# Make sure that all PDB files on Windows are installed to the output folder. By default, only the debug build does this.
set_target_properties(Deserialize PROPERTIES COMPILE_PDB_NAME "Deserialize" COMPILE_PDB_OUTPUT_DIRECTORY "${RUNTIME_OUTPUT_DIRECTORY}")
+elseif(APPLE)
+ set_target_properties(Deserialize PROPERTIES CXX_STANDARD 17)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
diff --git a/GLTFSDK.Samples/Deserialize/Source/main.cpp b/GLTFSDK.Samples/Deserialize/Source/main.cpp
index 80198fa..fb560e0 100644
--- a/GLTFSDK.Samples/Deserialize/Source/main.cpp
+++ b/GLTFSDK.Samples/Deserialize/Source/main.cpp
@@ -8,6 +8,9 @@
// Replace this with <filesystem> (and use std::filesystem rather than
// std::experimental::filesystem) if your toolchain fully supports C++17
+#if defined(__APPLE__)
+#define _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM
+#endif
#include <experimental/filesystem>
#include <fstream>
diff --git a/GLTFSDK.Samples/Serialize/CMakeLists.txt b/GLTFSDK.Samples/Serialize/CMakeLists.txt
index 5269da8..1129ea0 100644
--- a/GLTFSDK.Samples/Serialize/CMakeLists.txt
+++ b/GLTFSDK.Samples/Serialize/CMakeLists.txt
@@ -17,6 +17,8 @@ if (MSVC)
# Make sure that all PDB files on Windows are installed to the output folder. By default, only the debug build does this.
set_target_properties(Serialize PROPERTIES COMPILE_PDB_NAME "Serialize" COMPILE_PDB_OUTPUT_DIRECTORY "${RUNTIME_OUTPUT_DIRECTORY}")
+elseif(APPLE)
+ set_target_properties(Serialize PROPERTIES CXX_STANDARD 17)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
diff --git a/GLTFSDK.Samples/Serialize/Source/main.cpp b/GLTFSDK.Samples/Serialize/Source/main.cpp
index ac87c10..f5c6e0b 100644
--- a/GLTFSDK.Samples/Serialize/Source/main.cpp
+++ b/GLTFSDK.Samples/Serialize/Source/main.cpp
@@ -10,6 +10,9 @@
// Replace this with <filesystem> (and use std::filesystem rather than
// std::experimental::filesystem) if your toolchain fully supports C++17
+#if defined(__APPLE__)
+#define _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM
+#endif
#include <experimental/filesystem>
#include <fstream>

View File

@@ -0,0 +1,44 @@
diff --git a/Build/CMake/Modules/GLTFPlatform.cmake b/Build/CMake/Modules/GLTFPlatform.cmake
index 3d940f5..322f029 100644
--- a/Build/CMake/Modules/GLTFPlatform.cmake
+++ b/Build/CMake/Modules/GLTFPlatform.cmake
@@ -55,14 +55,14 @@ endfunction(GetGLTFPlatform)
function(CreateGLTFInstallTargets target platform)
install(TARGETS ${target}
- ARCHIVE DESTINATION ${CMAKE_SOURCE_DIR}/Built/Out/${platform}/$<CONFIG>/${PROJECT_NAME}
- LIBRARY DESTINATION ${CMAKE_SOURCE_DIR}/Built/Out/${platform}/$<CONFIG>/${PROJECT_NAME}
- RUNTIME DESTINATION ${CMAKE_SOURCE_DIR}/Built/Out/${platform}/$<CONFIG>/${PROJECT_NAME}
- BUNDLE DESTINATION ${CMAKE_SOURCE_DIR}/Built/Out/${platform}/$<CONFIG>/${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
+ BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
)
if (MSVC)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${PROJECT_NAME}.pdb DESTINATION ${CMAKE_SOURCE_DIR}/Built/Out/${platform}/$<CONFIG>/${PROJECT_NAME})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${PROJECT_NAME}.pdb DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
endif()
endfunction(CreateGLTFInstallTargets)
diff --git a/GLTFSDK.Test/CMakeLists.txt b/GLTFSDK.Test/CMakeLists.txt
index 5c8eca7..a0752a3 100644
--- a/GLTFSDK.Test/CMakeLists.txt
+++ b/GLTFSDK.Test/CMakeLists.txt
@@ -46,4 +46,4 @@ add_custom_command(TARGET GLTFSDK.Test
AddGLTFIOSAppProperties(GLTFSDK.Test)
CreateGLTFInstallTargets(GLTFSDK.Test ${Platform})
-install(FILES ${PROJECT_BINARY_DIR}/$<CONFIG>/Resources/ DESTINATION ${CMAKE_SOURCE_DIR}/Built/Out/${Platform}/$<CONFIG>/${PROJECT_NAME}/Resources)
+install(FILES ${PROJECT_BINARY_DIR}/$<CONFIG>/Resources/ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
diff --git a/GLTFSDK/CMakeLists.txt b/GLTFSDK/CMakeLists.txt
index 3c53c74..1e8d223 100644
--- a/GLTFSDK/CMakeLists.txt
+++ b/GLTFSDK/CMakeLists.txt
@@ -46,4 +46,5 @@ target_include_directories(GLTFSDK
PRIVATE "${CMAKE_BINARY_DIR}/GeneratedFiles"
)
+install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Inc/GLTFSDK DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
CreateGLTFInstallTargets(GLTFSDK ${Platform})

45
externals/vcpkg/ports/ms-gltf/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,45 @@
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO microsoft/glTF-SDK
REF ac3e70392feb6aef18a07314669f6af2ebc72787 # r1.9.5.4
SHA512 389b801ddc6f0b29269bcd1215fa9e63fe46a1f1a8778125c6439e34fe0925d5534b1cdbea30824a4a8aa008015124dc7cc4558daa9522fc6d85e00e8e41e4a9
HEAD_REF master
PATCHES
fix-install.patch
fix-apple-filesystem.patch
)
# note: Test/Sample executables won't be installed
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
test ENABLE_UNIT_TESTS
samples ENABLE_SAMPLES
)
# note: Platform-native buildsystem will be more helpful to launch/debug the tests/samples.
# note: The PDB file path is making Ninja fails to install.
# For Windows, we rely on /MP. The other platforms should be able to build with PREFER_NINJA.
set(WINDOWS_USE_MSBUILD)
if(VCPKG_TARGET_IS_WINDOWS)
set(WINDOWS_USE_MSBUILD "WINDOWS_USE_MSBUILD")
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
${WINDOWS_USE_MSBUILD}
OPTIONS
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

29
externals/vcpkg/ports/ms-gltf/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,29 @@
{
"name": "ms-gltf",
"version-string": "r1.9.5.4",
"port-version": 1,
"description": "glTF-SDK is a C++ Software Development Kit for glTF",
"homepage": "https://github.com/microsoft/glTF-SDK",
"supports": "!linux",
"dependencies": [
"rapidjson",
{
"name": "vcpkg-cmake",
"host": true
}
],
"default-features": [
"test"
],
"features": {
"samples": {
"description": "Build with GLTF samples"
},
"test": {
"description": "Build test programs",
"dependencies": [
"gtest"
]
}
}
}