#include <algorithm>
#include <sys/stat.h>
#include <sys/types.h>
+#include <filesystem>
#ifdef _WIN32
#define NOMINMAX
if (args.find("--glslc") != args.end()) {
GLSLC = args["--glslc"]; // Path to glslc
+
+ if (!std::filesystem::exists(GLSLC) || !std::filesystem::is_regular_file(GLSLC)) {
+ std::cerr << "Error: glslc not found at " << GLSLC << std::endl;
+ return EXIT_FAILURE;
+ }
}
if (args.find("--source") != args.end()) {
input_filepath = args["--source"]; // The shader source file to compile