1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

cmake: consolidate zlib/zstd 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:
Emil Velikov
2025-09-14 15:50:50 +01:00
committed by Sébastien Helleu
parent 20a7affb70
commit b38c00bb0d
4 changed files with 2 additions and 16 deletions
+2
View File
@@ -258,10 +258,12 @@ list(APPEND EXTRA_LIBS ${GNUTLS_LDFLAGS})
# Check for zlib
find_package(ZLIB REQUIRED)
list(APPEND EXTRA_LIBS ${ZLIB_LIBRARY})
# Check for zstd
if(ENABLE_ZSTD)
pkg_check_modules(LIBZSTD REQUIRED libzstd)
list(APPEND EXTRA_LIBS ${LIBZSTD_LDFLAGS})
add_definitions(-DHAVE_ZSTD)
endif()
-6
View File
@@ -47,12 +47,6 @@ endif()
list(APPEND EXTRA_LIBS "m")
list(APPEND EXTRA_LIBS ${ZLIB_LIBRARY})
if(ENABLE_ZSTD)
list(APPEND EXTRA_LIBS ${LIBZSTD_LDFLAGS})
endif()
if(ENABLE_NCURSES)
subdirs(normal)
endif()
-8
View File
@@ -66,12 +66,6 @@ endif()
list(APPEND EXTRA_LIBS "m")
list(APPEND EXTRA_LIBS ${ZLIB_LIBRARY})
if(ENABLE_ZSTD)
list(APPEND EXTRA_LIBS ${LIBZSTD_LDFLAGS})
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# link with resolv lib on macOS
list(APPEND EXTRA_LIBS "resolv")
@@ -84,8 +78,6 @@ list(APPEND FUZZ_TARGET_LINK
weechat_gui_headless
weechat_ncurses_fake
${EXTRA_LIBS}
${ZLIB_LIBRARY}
${LIBZSTD_LDFLAGS}
-rdynamic
)
-2
View File
@@ -235,8 +235,6 @@ target_link_libraries(tests
weechat_ncurses_fake
weechat_unit_tests_core
${EXTRA_LIBS}
${ZLIB_LIBRARY}
${LIBZSTD_LDFLAGS}
${CPPUTEST_LIBRARIES}
-rdynamic
)