CMake: link with Intl when necessary for kfreebsd of non-glibc libs like alpine
* non Glibc system linking with Intl library may be needed whenGettext support is enabled. * https://git.alpinelinux.org/aports/tree/community/minetest/0001-CMake-link-with-Intl-when-necessary.patch * Fixes: clientlauncher.cpp:(.text+0xcac): undefined reference to `libintl_gettext' * backported df01036c3f
This commit is contained in:
parent
88a9023d12
commit
80d97d28d3
@ -70,6 +70,14 @@ if(ENABLE_GETTEXT)
|
|||||||
endif()
|
endif()
|
||||||
set(USE_GETTEXT TRUE)
|
set(USE_GETTEXT TRUE)
|
||||||
message(STATUS "GetText enabled; locales found: ${GETTEXT_AVAILABLE_LOCALES}")
|
message(STATUS "GetText enabled; locales found: ${GETTEXT_AVAILABLE_LOCALES}")
|
||||||
|
# On some platforms, such as Linux with GNU libc, the gettext
|
||||||
|
# functions are present in the C standard library and libintl
|
||||||
|
# is not required. For other libc (uClibc-ng or musl) libintl
|
||||||
|
# may be required.
|
||||||
|
find_package(Intl)
|
||||||
|
if(NOT Intl_LIBRARIES STREQUAL "")
|
||||||
|
message(STATUS "GetText Intl : ${Intl_LIBRARIES}")
|
||||||
|
endif()
|
||||||
endif(GETTEXT_FOUND)
|
endif(GETTEXT_FOUND)
|
||||||
else()
|
else()
|
||||||
mark_as_advanced(GETTEXT_ICONV_DLL GETTEXT_INCLUDE_DIR GETTEXT_LIBRARY GETTEXT_MSGFMT)
|
mark_as_advanced(GETTEXT_ICONV_DLL GETTEXT_INCLUDE_DIR GETTEXT_LIBRARY GETTEXT_MSGFMT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user