Externals: add tinygltf, a library used to load or save GLTF mesh files

This commit is contained in:
iwubcode
2024-02-04 17:10:07 -06:00
parent 80d77ac0b4
commit ecfcae8718
8 changed files with 77 additions and 0 deletions

11
Externals/tinygltf/CMakeLists.txt vendored Normal file
View File

@ -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)

14
Externals/tinygltf/exports.props vendored Normal file
View File

@ -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>

1
Externals/tinygltf/tinygltf vendored Submodule

35
Externals/tinygltf/tinygltf.vcxproj vendored Normal file
View File

@ -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>