vcpkg/ports/folly/fix-fmt-patch-for-old-cmake.patch

19 lines
590 B
Diff
Raw Normal View History

diff --git a/CMake/GenPkgConfig.cmake b/CMake/GenPkgConfig.cmake
index 0e93175bd..9de854022 100644
--- a/CMake/GenPkgConfig.cmake
+++ b/CMake/GenPkgConfig.cmake
@@ -103,6 +103,11 @@ function(gen_pkgconfig_vars)
"<COMPILE_LANG_AND_ID:CUDA,NVIDIA>" "<COMPILE_LANGUAGE:CUDA>"
cflags "${cflags}"
)
+
+ endif()
+ # patch for fmt's generator expression on older CMake
+ if (MSVC)
+ string(REPLACE "$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>" "/utf-8" cflags "${cflags}")
endif()
set("${var_prefix}_CFLAGS" "${cflags}" PARENT_SCOPE)
--
2.34.1