mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
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.
This commit is contained in:
parent
73cade558a
commit
970a963896
1 changed files with 10 additions and 0 deletions
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in a new issue