From 970a963896162617af3e18fb2df953dbeac0a4fc Mon Sep 17 00:00:00 2001 From: David Adam Date: Sat, 26 Mar 2022 21:51:42 +0800 Subject: [PATCH] cmake: disable frameworks when searching for libintl This is a less-intrusive version of 95845b1, and only disables the search for frameworks for libintil (sometimes shipped with Mono, but not usable for compilation). Closes #5244. --- cmake/gettext.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmake/gettext.cmake b/cmake/gettext.cmake index deef86d18..7b06d6c6e 100644 --- a/cmake/gettext.cmake +++ b/cmake/gettext.cmake @@ -4,12 +4,22 @@ include(FeatureSummary) option(WITH_GETTEXT "translate messages if gettext is available" ON) if(WITH_GETTEXT) + if(APPLE) + # Fix for https://github.com/fish-shell/fish-shell/issues/5244 + # via https://gitlab.kitware.com/cmake/cmake/-/issues/18921 + set(CMAKE_FIND_FRAMEWORK_OLD ${CMAKE_FIND_FRAMEWORK}) + set(CMAKE_FIND_FRAMEWORK NEVER) + endif() find_package(Intl QUIET) find_package(Gettext) if(GETTEXT_FOUND) set(HAVE_GETTEXT 1) include_directories(${Intl_INCLUDE_DIR}) endif() + if(APPLE) + set(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_OLD}) + unset(CMAKE_FIND_FRAMEWORK_OLD) + endif() endif() add_feature_info(gettext GETTEXT_FOUND "translate messages with gettext")