aboutsummaryrefslogtreecommitdiff
path: root/tools/depends
diff options
context:
space:
mode:
authorfuzzard <fuzzard@kodi.tv>2022-03-12 11:33:38 +1000
committerfuzzard <fuzzard@kodi.tv>2022-03-12 19:59:15 +1000
commita22af94995f300288826fe991619ed66f1ff4b67 (patch)
tree20bd6b62315f3e3b71e6869071a5d0ec3cfe8efe /tools/depends
parente0cb6709900f352a5bb37352b05f7ed4d16e5be5 (diff)
[cmake] FindFMT enable ENABLE_INTERNAL_FMT for windows
Diffstat (limited to 'tools/depends')
-rw-r--r--tools/depends/target/fmt/001-windows-pdb-symbol-gen.patch42
-rw-r--r--tools/depends/target/fmt/FMT-VERSION1
2 files changed, 43 insertions, 0 deletions
diff --git a/tools/depends/target/fmt/001-windows-pdb-symbol-gen.patch b/tools/depends/target/fmt/001-windows-pdb-symbol-gen.patch
new file mode 100644
index 0000000000..fed1a83a89
--- /dev/null
+++ b/tools/depends/target/fmt/001-windows-pdb-symbol-gen.patch
@@ -0,0 +1,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")
diff --git a/tools/depends/target/fmt/FMT-VERSION b/tools/depends/target/fmt/FMT-VERSION
index dc41a75ec0..cbaa58dd7d 100644
--- a/tools/depends/target/fmt/FMT-VERSION
+++ b/tools/depends/target/fmt/FMT-VERSION
@@ -3,3 +3,4 @@ VERSION=8.0.1
ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
SHA512=643e68d5b2e0e9c83231ab2b0036596a6297b1d9ed6bd7b1172bee4ff134c8af8f09174c06c94225132c1b635b0977ea4ce783748d7bd76a9a0b5ad597456c84
BYPRODUCT=libfmt.a
+BYPRODUCT_WIN=fmt.lib