diff --git a/CMakeLists.txt b/CMakeLists.txt
index f4d24be42..83c499f89 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -179,6 +179,7 @@ else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
endif()
+
# Write binaries to a seperate directory.
if(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin/${CPU_ARCH}")
@@ -205,6 +206,9 @@ if(BUILD_TESTS)
enable_testing()
endif()
+# Prevent fmt from being built with exceptions, or being thrown at call sites.
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFMT_EXCEPTIONS=0")
+
# Use C++17 for building dependencies (some aren't C++20-aware, e.g. reshadefx).
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
diff --git a/dep/fmt/fmt.vcxproj b/dep/fmt/fmt.vcxproj
index 7c4a89228..21fd13017 100644
--- a/dep/fmt/fmt.vcxproj
+++ b/dep/fmt/fmt.vcxproj
@@ -28,6 +28,7 @@
TurnOffAllWarnings
$(SolutionDir)dep\fmt\include;$(ProjectDir)include;%(AdditionalIncludeDirectories)
+ FMT_EXCEPTIONS=0;%(PreprocessorDefinitions)
diff --git a/src/common/common.props b/src/common/common.props
index d4fea59a8..b372bc02e 100644
--- a/src/common/common.props
+++ b/src/common/common.props
@@ -3,6 +3,7 @@
$(SolutionDir)src;%(AdditionalIncludeDirectories);$(SolutionDir)dep\fast_float\include;$(SolutionDir)dep\fmt\include;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\minizip\include;$(SolutionDir)dep\stb\include
+ %(PreprocessorDefinitions);FMT_EXCEPTIONS=0
stdcpp20