blob: 3b00eb35f1e2ab69b719ccc438e10bc2aad3696e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -309,6 +309,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}"
@@ -407,6 +414,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 "${pkgconfig}" DESTINATION "${FMT_PKGCONFIG_DIR}")
endif ()
|