--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -249,6 +249,13 @@
 
 set(FMT_DEBUG_POSTFIX d CACHE STRING "Debug library postfix.")
 
+if (WIN32 OR WINDOWS_STORE)
+  set_target_properties(fmt PROPERTIES
+    COMPILE_PDB_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
+    COMPILE_PDB_NAME fmt
+    COMPILE_PDB_NAME_DEBUG fmt${FMT_DEBUG_POSTFIX}
+  )
+endif()
 set_target_properties(fmt PROPERTIES
   VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}
   PUBLIC_HEADER "${FMT_HEADERS}"
@@ -339,6 +350,18 @@
   install(EXPORT ${targets_export_name} DESTINATION ${FMT_CMAKE_DIR}
           NAMESPACE fmt::)
 
+  # Install COMPILE_PDB Files for windows
+  if(NOT BUILD_SHARED_LIBS AND (WIN32 OR WINDOWS_STORE))
+    install(FILES ${PROJECT_BINARY_DIR}/RelWithDebInfo/fmt.pdb
+      DESTINATION lib
+      CONFIGURATIONS RelWithDebInfo
+    )
+    install(FILES ${PROJECT_BINARY_DIR}/Debug/fmtd.pdb
+      DESTINATION lib
+      CONFIGURATIONS Debug
+    )
+  endif()
+
   install(FILES $<TARGET_PDB_FILE:${INSTALL_TARGETS}>
           DESTINATION ${FMT_LIB_DIR} OPTIONAL)
   install(FILES "${pkgconfig}" DESTINATION "${FMT_PKGCONFIG_DIR}")