Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -656,7 +656,7 @@ if(APPLE)
 	list(APPEND CMAKE_PREFIX_PATH /opt/homebrew/)
 endif()
 
-if(NOT WIN32 OR NOT MSVC)
+if(NOT CMAKE_SYSTEM_NAME MATCHES BSD)
 	include(CheckCXXSourceCompiles)
 	set(FS_SRC "
 	#include <experimental/filesystem> 
