blob: fed1a83a89604df09d0a5b2321a37a7d37c2b679 (
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
36
37
38
39
40
41
42
|
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -268,9 +268,20 @@
set(FMT_DEBUG_POSTFIX d CACHE STRING "Debug library postfix.")
+if (WIN32 OR WINDOWS_STORE)
+ set_target_properties(fmt PROPERTIES
+ VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}
+ OUTPUT_NAME fmt
+ OUTPUT_NAME_DEBUG fmt${FMT_DEBUG_POSTFIX}
+ COMPILE_PDB_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
+ COMPILE_PDB_NAME fmt
+ COMPILE_PDB_NAME_DEBUG fmt${FMT_DEBUG_POSTFIX}
+ )
+else()
set_target_properties(fmt PROPERTIES
VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}
DEBUG_POSTFIX "${FMT_DEBUG_POSTFIX}")
+endif()
# Set FMT_LIB_NAME for pkg-config fmt.pc. We cannot use the OUTPUT_NAME target
# property because it's not set by default.
@@ -361,6 +372,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 ${FMT_HEADERS} DESTINATION "${FMT_INC_DIR}/fmt")
|