--- a/tiledb/common/logger.h
+++ b/tiledb/common/logger.h
@@ -35,6 +35,10 @@
 #ifndef TILEDB_LOGGER_H
 #define TILEDB_LOGGER_H
 
+#ifndef SPDLOG_FMT_EXTERNAL
+#define SPDLOG_FMT_EXTERNAL
+#endif
+
 #include <spdlog/fmt/ostr.h>
 #include <spdlog/spdlog.h>
 
