mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
cmake: consolidate iconv/gettext library handling
Move the handling to the top-level, adding it _once_ to EXTRA_LIBS. Thus avoiding some duplication across the board. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
committed by
Sébastien Helleu
parent
b38c00bb0d
commit
ae54c3ef65
@@ -276,6 +276,9 @@ endif()
|
||||
# Check for iconv
|
||||
find_package(Iconv)
|
||||
if(ICONV_FOUND)
|
||||
if(ICONV_LIBRARY)
|
||||
list(APPEND EXTRA_LIBS ${ICONV_LIBRARY})
|
||||
endif()
|
||||
add_definitions(-DHAVE_ICONV)
|
||||
endif()
|
||||
|
||||
@@ -297,6 +300,9 @@ add_subdirectory(icons)
|
||||
|
||||
if(ENABLE_NLS)
|
||||
find_package(Gettext REQUIRED)
|
||||
if(LIBINTL_LIBRARY)
|
||||
list(APPEND EXTRA_LIBS ${LIBINTL_LIBRARY})
|
||||
endif()
|
||||
find_package(Intl REQUIRED)
|
||||
include_directories(${Intl_INCLUDE_DIRS})
|
||||
list(APPEND EXTRA_LIBS "${Intl_LIBRARIES}")
|
||||
|
||||
@@ -37,14 +37,6 @@ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Haiku")
|
||||
list(APPEND EXTRA_LIBS "pthread")
|
||||
endif()
|
||||
|
||||
if(ICONV_LIBRARY)
|
||||
list(APPEND EXTRA_LIBS ${ICONV_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(LIBINTL_LIBRARY)
|
||||
list(APPEND EXTRA_LIBS ${LIBINTL_LIBRARY})
|
||||
endif()
|
||||
|
||||
list(APPEND EXTRA_LIBS "m")
|
||||
|
||||
if(ENABLE_NCURSES)
|
||||
|
||||
@@ -56,14 +56,6 @@ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Haiku")
|
||||
list(APPEND EXTRA_LIBS "pthread")
|
||||
endif()
|
||||
|
||||
if(ICONV_LIBRARY)
|
||||
list(APPEND EXTRA_LIBS ${ICONV_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(LIBINTL_LIBRARY)
|
||||
list(APPEND EXTRA_LIBS ${LIBINTL_LIBRARY})
|
||||
endif()
|
||||
|
||||
list(APPEND EXTRA_LIBS "m")
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
||||
@@ -206,10 +206,6 @@ endif()
|
||||
|
||||
add_library(weechat_unit_tests_plugins MODULE ${LIB_WEECHAT_UNIT_TESTS_PLUGINS_SRC})
|
||||
|
||||
if(ICONV_LIBRARY)
|
||||
list(APPEND EXTRA_LIBS ${ICONV_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
|
||||
list(APPEND EXTRA_LIBS "intl")
|
||||
if(HAVE_BACKTRACE)
|
||||
|
||||
Reference in New Issue
Block a user