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")