mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08: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
@ -4,12 +4,22 @@ include(FeatureSummary)
|
|||||||
|
|
||||||
option(WITH_GETTEXT "translate messages if gettext is available" ON)
|
option(WITH_GETTEXT "translate messages if gettext is available" ON)
|
||||||
if(WITH_GETTEXT)
|
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(Intl QUIET)
|
||||||
find_package(Gettext)
|
find_package(Gettext)
|
||||||
if(GETTEXT_FOUND)
|
if(GETTEXT_FOUND)
|
||||||
set(HAVE_GETTEXT 1)
|
set(HAVE_GETTEXT 1)
|
||||||
include_directories(${Intl_INCLUDE_DIR})
|
include_directories(${Intl_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
if(APPLE)
|
||||||
|
set(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_OLD})
|
||||||
|
unset(CMAKE_FIND_FRAMEWORK_OLD)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
add_feature_info(gettext GETTEXT_FOUND "translate messages with gettext")
|
add_feature_info(gettext GETTEXT_FOUND "translate messages with gettext")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user