diff options
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rw-r--r-- | CMakeLists.txt | 1 | ||||
| -rw-r--r-- | Externals/tinygltf/CMakeLists.txt | 11 | ||||
| -rw-r--r-- | Externals/tinygltf/exports.props | 14 | ||||
| m--------- | Externals/tinygltf/tinygltf | 0 | ||||
| -rw-r--r-- | Externals/tinygltf/tinygltf.vcxproj | 35 | ||||
| -rw-r--r-- | Source/Core/DolphinLib.vcxproj | 1 | ||||
| -rw-r--r-- | Source/dolphin-emu.sln | 11 |
8 files changed, 76 insertions, 0 deletions
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 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + <ItemDefinitionGroup> + <ClCompile> + <AdditionalIncludeDirectories>$(ExternalsDir)tinygltf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>TINYGLTF_NOEXCEPTION;TINYGLTF_NO_EXTERNAL_IMAGE;TINYGLTF_USE_CPP14;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ProjectReference Include="$(ExternalsDir)tinygltf\tinygltf.vcxproj"> + <Project>{8bda3693-4999-4d11-9e52-8d08c30b643a}</Project> + </ProjectReference> + </ItemGroup> +</Project> diff --git a/Externals/tinygltf/tinygltf b/Externals/tinygltf/tinygltf new file mode 160000 +Subproject c5641f2c22d117da7971504591a8f6a41ece488 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + <Import Project="..\..\Source\VSProps\Base.Macros.props" /> + <Import Project="$(VSPropsDir)Base.Targets.props" /> + <PropertyGroup Label="Globals"> + <ProjectGuid>{8bda3693-4999-4d11-9e52-8d08c30b643a}</ProjectGuid> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <Import Project="$(VSPropsDir)Configuration.StaticLibrary.props" /> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings" /> + <ImportGroup Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VSPropsDir)Base.props" /> + <Import Project="$(VSPropsDir)ClDisableAllWarnings.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <ItemDefinitionGroup> + <ClCompile> + <AdditionalIncludeDirectories>tinygltf;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + </ClCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="tinygltf/tiny_gltf.cc" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="tinygltf/json.hpp" /> + <ClInclude Include="tinygltf/stb_image.h" /> + <ClInclude Include="tinygltf/stb_image_write.h" /> + <ClInclude Include="tinygltf/tiny_gltf.h" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> 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 @@ <Import Project="$(ExternalsDir)SFML\exports.props" /> <Import Project="$(ExternalsDir)soundtouch\exports.props" /> <Import Project="$(ExternalsDir)spirv_cross\exports.props" /> + <Import Project="$(ExternalsDir)tinygltf\exports.props" /> <Import Project="$(ExternalsDir)xxhash\exports.props" /> <Import Project="$(ExternalsDir)zlib-ng\exports.props" /> <Import Project="$(ExternalsDir)zstd\exports.props" /> 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} |
