From c56197b1d296e2e4f24e7b3fe71db527598c80f3 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Thu, 4 Jul 2024 01:10:40 +0200 Subject: [PATCH] Remove std::filesystem::absolute dependency for glslang on macOS as it is only supported on macOS 14 --- libraries/ZVulkan/src/glslang/glslang/Include/InfoSink.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libraries/ZVulkan/src/glslang/glslang/Include/InfoSink.h b/libraries/ZVulkan/src/glslang/glslang/Include/InfoSink.h index 23f495dcb..aa8f489f4 100644 --- a/libraries/ZVulkan/src/glslang/glslang/Include/InfoSink.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/InfoSink.h @@ -100,6 +100,14 @@ public: char locText[maxSize]; snprintf(locText, maxSize, ":%d", loc.line); +#ifdef __APPLE__ // crapple only implemented std::filesystem::absolute on the very latest macOS. + std::string location = loc.getStringNameOrNum(false); + if (absolute) { + append(std::filesystem::absolute(location).string()); + } else { + append(location); + } +#else if(loc.getFilename() == nullptr && shaderFileName != nullptr && absolute) { append(std::filesystem::absolute(shaderFileName).string()); } else { @@ -110,6 +118,7 @@ public: append(location); } } +#endif append(locText); append(": ");