From 0b5781bd237589e0f361c93edd720472046edc7c Mon Sep 17 00:00:00 2001 From: Julien Jerphanion Date: Mon, 12 Aug 2024 14:55:16 +0200 Subject: [PATCH] patch: fix: Do not use generator expression for "/utf-8" on Windows Signed-off-by: Julien Jerphanion --- ...enerator-expression-for-utf-8-on-Win.patch | 35 +++++++++++++++++++ recipe/meta.yaml | 1 + 2 files changed, 36 insertions(+) create mode 100644 recipe/0001-fix-Do-not-use-generator-expression-for-utf-8-on-Win.patch diff --git a/recipe/0001-fix-Do-not-use-generator-expression-for-utf-8-on-Win.patch b/recipe/0001-fix-Do-not-use-generator-expression-for-utf-8-on-Win.patch new file mode 100644 index 0000000..3d06a45 --- /dev/null +++ b/recipe/0001-fix-Do-not-use-generator-expression-for-utf-8-on-Win.patch @@ -0,0 +1,35 @@ +From f9761e6f86d095cd606a7981a581ab4eeac47555 Mon Sep 17 00:00:00 2001 +From: Julien Jerphanion +Date: Mon, 12 Aug 2024 14:52:38 +0200 +Subject: [PATCH] fix: Do not use generator expression for "/utf-8" on Windows + +See: https://github.com/facebook/folly/issues/2250 + +Signed-off-by: Julien Jerphanion +--- + CMake/GenPkgConfig.cmake | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/CMake/GenPkgConfig.cmake b/CMake/GenPkgConfig.cmake +index 0e93175bd..b8875fbf1 100644 +--- a/CMake/GenPkgConfig.cmake ++++ b/CMake/GenPkgConfig.cmake +@@ -105,6 +105,15 @@ function(gen_pkgconfig_vars) + ) + endif() + ++ # On Windows replace "$<$:/utf-8>" with "/utf-8" ++ # See: https://github.com/facebook/folly/issues/1433 ++ if(WIN32) ++ string(REPLACE ++ "$<$:/utf-8>" "/utf-8" ++ cflags "${cflags}" ++ ) ++ endif() ++ + set("${var_prefix}_CFLAGS" "${cflags}" PARENT_SCOPE) + set("${var_prefix}_PRIVATE_LIBS" "${private_libs}" PARENT_SCOPE) + endfunction() +-- +2.45.2 + diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c4a53ee..6bfdb2b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -12,6 +12,7 @@ source: patches: - 0001-Use-CMAKE_SYSTEM_PROCESSOR-instead-of-CMAKE_LIBRARY_.patch - 0001-Add-missing-unistd-include.patch + - 0001-fix-Do-not-use-generator-expression-for-utf-8-on-Win.patch build: number: 1