diff --git a/.gitmodules b/.gitmodules index 18429a82e6..c1019fc939 100644 --- a/.gitmodules +++ b/.gitmodules @@ -75,3 +75,6 @@ [submodule "hidapi-src"] path = Externals/hidapi/hidapi-src url = https://github.com/libusb/hidapi +[submodule "Externals/tinygltf/tinygltf"] + path = Externals/tinygltf/tinygltf + url = https://github.com/syoyo/tinygltf.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 88e8f4a8f5..1ff8bd9db3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -638,6 +638,7 @@ add_subdirectory(Externals/glslang) if(WIN32 OR APPLE) add_subdirectory(Externals/spirv_cross) endif() +add_subdirectory(Externals/tinygltf) if(ENABLE_VULKAN) add_definitions(-DHAS_VULKAN) diff --git a/Externals/tinygltf/CMakeLists.txt b/Externals/tinygltf/CMakeLists.txt new file mode 100644 index 0000000000..a551d6def3 --- /dev/null +++ b/Externals/tinygltf/CMakeLists.txt @@ -0,0 +1,11 @@ +add_library(tinygltf STATIC) +target_compile_definitions(tinygltf PUBLIC TINYGLTF_NOEXCEPTION) +target_compile_definitions(tinygltf PUBLIC TINYGLTF_NO_EXTERNAL_IMAGE) +target_compile_definitions(tinygltf PUBLIC TINYGLTF_USE_CPP14) +if (NOT MSVC) + target_compile_features(tinygltf PRIVATE cxx_std_20) +endif() +target_sources(tinygltf PRIVATE + tinygltf/tiny_gltf.cc) +target_include_directories(tinygltf INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +dolphin_disable_warnings_msvc(tinygltf) diff --git a/Externals/tinygltf/exports.props b/Externals/tinygltf/exports.props new file mode 100644 index 0000000000..7e2fde81cf --- /dev/null +++ b/Externals/tinygltf/exports.props @@ -0,0 +1,14 @@ + + + + + $(ExternalsDir)tinygltf;%(AdditionalIncludeDirectories) + TINYGLTF_NOEXCEPTION;TINYGLTF_NO_EXTERNAL_IMAGE;TINYGLTF_USE_CPP14;%(PreprocessorDefinitions) + + + + + {8bda3693-4999-4d11-9e52-8d08c30b643a} + + + diff --git a/Externals/tinygltf/tinygltf b/Externals/tinygltf/tinygltf new file mode 160000 index 0000000000..c5641f2c22 --- /dev/null +++ b/Externals/tinygltf/tinygltf @@ -0,0 +1 @@ +Subproject commit c5641f2c22d117da7971504591a8f6a41ece488b diff --git a/Externals/tinygltf/tinygltf.vcxproj b/Externals/tinygltf/tinygltf.vcxproj new file mode 100644 index 0000000000..e33d949e56 --- /dev/null +++ b/Externals/tinygltf/tinygltf.vcxproj @@ -0,0 +1,35 @@ + + + + + + {8bda3693-4999-4d11-9e52-8d08c30b643a} + + + + + + + + + + + + + + tinygltf;%(AdditionalIncludeDirectories) + + + + + + + + + + + + + + + diff --git a/Source/Core/DolphinLib.vcxproj b/Source/Core/DolphinLib.vcxproj index d2071d6618..da443ea45b 100644 --- a/Source/Core/DolphinLib.vcxproj +++ b/Source/Core/DolphinLib.vcxproj @@ -58,6 +58,7 @@ + diff --git a/Source/dolphin-emu.sln b/Source/dolphin-emu.sln index a123e396dd..d4a6de1913 100644 --- a/Source/dolphin-emu.sln +++ b/Source/dolphin-emu.sln @@ -91,6 +91,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spng", "..\Externals\libspn EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rcheevos", "..\Externals\rcheevos\rcheevos.vcxproj", "{CC99A910-3752-4465-95AA-7DC240D92A99}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinygltf", "..\Externals\tinygltf\tinygltf.vcxproj", "{8BDA3693-4999-4D11-9E52-8D08C30B643A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM64 = Debug|ARM64 @@ -439,6 +441,14 @@ Global {CC99A910-3752-4465-95AA-7DC240D92A99}.Release|ARM64.Build.0 = Release|ARM64 {CC99A910-3752-4465-95AA-7DC240D92A99}.Release|x64.ActiveCfg = Release|x64 {CC99A910-3752-4465-95AA-7DC240D92A99}.Release|x64.Build.0 = Release|x64 + {8BDA3693-4999-4D11-9E52-8D08C30B643A}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {8BDA3693-4999-4D11-9E52-8D08C30B643A}.Debug|ARM64.Build.0 = Debug|ARM64 + {8BDA3693-4999-4D11-9E52-8D08C30B643A}.Debug|x64.ActiveCfg = Debug|x64 + {8BDA3693-4999-4D11-9E52-8D08C30B643A}.Debug|x64.Build.0 = Debug|x64 + {8BDA3693-4999-4D11-9E52-8D08C30B643A}.Release|ARM64.ActiveCfg = Release|ARM64 + {8BDA3693-4999-4D11-9E52-8D08C30B643A}.Release|ARM64.Build.0 = Release|ARM64 + {8BDA3693-4999-4D11-9E52-8D08C30B643A}.Release|x64.ActiveCfg = Release|x64 + {8BDA3693-4999-4D11-9E52-8D08C30B643A}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -477,6 +487,7 @@ Global {3F17D282-A77D-4931-B844-903AD0809A5E} = {87ADDFF9-5768-4DA2-A33B-2477593D6677} {447B7B1E-1D74-4AEF-B2B9-6EB41C5D5313} = {87ADDFF9-5768-4DA2-A33B-2477593D6677} {CC99A910-3752-4465-95AA-7DC240D92A99} = {87ADDFF9-5768-4DA2-A33B-2477593D6677} + {8BDA3693-4999-4D11-9E52-8D08C30B643A} = {87ADDFF9-5768-4DA2-A33B-2477593D6677} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {64B0A343-3B94-4522-9C24-6937FE5EFB22}