CMake: link with Intl when necessary
* 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. Thanks Debian the mother of all distros! * close https://github.com/minetest/minetest/issues/8583 * fixed https://github.com/minetest/minetest/issues/8588
This commit is contained in:
parent
e8265931bc
commit
fb8401098e
@ -84,6 +84,14 @@ if(ENABLE_GETTEXT)
|
||||
endif()
|
||||
set(USE_GETTEXT TRUE)
|
||||
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(GETTEXTLIB_FOUND)
|
||||
else()
|
||||
mark_as_advanced(GETTEXT_ICONV_DLL GETTEXT_INCLUDE_DIR GETTEXT_LIBRARY GETTEXT_MSGFMT)
|
||||
@ -575,6 +583,7 @@ if(BUILD_CLIENT)
|
||||
${BZIP2_LIBRARIES}
|
||||
${PNG_LIBRARIES}
|
||||
${X11_LIBRARIES}
|
||||
${Intl_LIBRARIES}
|
||||
${SOUND_LIBRARIES}
|
||||
${SQLITE3_LIBRARY}
|
||||
${LUA_LIBRARY}
|
||||
@ -684,6 +693,7 @@ if(BUILD_SERVER)
|
||||
${ZLIB_LIBRARIES}
|
||||
${SQLITE3_LIBRARY}
|
||||
${JSON_LIBRARY}
|
||||
${Intl_LIBRARIES}
|
||||
${LUA_LIBRARY}
|
||||
${GMP_LIBRARY}
|
||||
${PLATFORM_LIBS}
|
||||
|
Loading…
x
Reference in New Issue
Block a user