| 1 |
Index: dolphin-emu/CMakeLists.txt |
| 2 |
=================================================================== |
| 3 |
--- dolphin-emu.orig/CMakeLists.txt |
| 4 |
+++ dolphin-emu/CMakeLists.txt |
| 5 |
@@ -639,7 +639,8 @@ add_subdirectory(Externals/glslang) |
| 6 |
if(WIN32 OR APPLE) |
| 7 |
add_subdirectory(Externals/spirv_cross) |
| 8 |
endif() |
| 9 |
-add_subdirectory(Externals/tinygltf) |
| 10 |
+ |
| 11 |
+dolphin_find_optional_system_library_pkgconfig(tinygltf tinygltf tinygltf::tinygltf Externals/tinygltf) |
| 12 |
|
| 13 |
if(ENABLE_VULKAN) |
| 14 |
add_definitions(-DHAS_VULKAN) |
| 15 |
Index: dolphin-emu/Source/Core/VideoCommon/Assets/MeshAsset.cpp |
| 16 |
=================================================================== |
| 17 |
--- dolphin-emu.orig/Source/Core/VideoCommon/Assets/MeshAsset.cpp |
| 18 |
+++ dolphin-emu/Source/Core/VideoCommon/Assets/MeshAsset.cpp |
| 19 |
@@ -7,7 +7,11 @@ |
| 20 |
#include <array> |
| 21 |
#include <utility> |
| 22 |
|
| 23 |
-#include <tinygltf/tiny_gltf.h> |
| 24 |
+#if __has_include(<tinygltf/tiny_gltf.h>) |
| 25 |
+# include <tinygltf/tiny_gltf.h> |
| 26 |
+#else |
| 27 |
+# include <tiny_gltf.h> |
| 28 |
+#endif |
| 29 |
|
| 30 |
#include "Common/IOFile.h" |
| 31 |
#include "Common/Logging/Log.h" |