[ms-gltf] Disable feature samples on macOS, iOS, and Android (#30943)

* [ms-gltf] Disable feature samples on macOS, iOS, and Android

* update version
This commit is contained in:
Lily Wang 2023-04-19 07:57:03 +08:00 committed by GitHub
parent 93c0ba0e2c
commit c84e93a76f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 71 deletions

View File

@ -1,66 +0,0 @@
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

@ -10,7 +10,6 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
fix-install.patch
fix-apple-filesystem.patch
)
# note: Test/Sample executables won't be installed
@ -37,4 +36,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@ -1,7 +1,7 @@
{
"name": "ms-gltf",
"version-date": "2022-06-28",
"port-version": 1,
"port-version": 2,
"description": "glTF-SDK is a C++ Software Development Kit for glTF",
"homepage": "https://github.com/microsoft/glTF-SDK",
"license": "MIT",
@ -18,7 +18,8 @@
],
"features": {
"samples": {
"description": "Build with GLTF samples"
"description": "Build with GLTF samples",
"supports": "!osx & !ios & !android"
},
"test": {
"description": "Build test programs",

View File

@ -5322,7 +5322,7 @@
},
"ms-gltf": {
"baseline": "2022-06-28",
"port-version": 1
"port-version": 2
},
"ms-gsl": {
"baseline": "4.0.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5fb5ea5c5659fa04f4038a9df76b469f39c4e8f0",
"version-date": "2022-06-28",
"port-version": 2
},
{
"git-tree": "b189e4d23ebe85437573b386d94b06b3f9fb6238",
"version-date": "2022-06-28",