mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 02:03:13 +02:00
cmake: remove Darwin/resolv quirks
Since commit e98a32373 ("core: check if res_init requires linking with
libresolv") we detect if/when we should be linking against libresolv.
The detection seems a bit clunky (to me), although it's better to keep
things consolidated/consistent across tree. Swap the Darwin checks with
the new token LIBRESOLV_HAS_RES_INIT.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
committed by
Sébastien Helleu
parent
323ab8810e
commit
4decd2c386
@@ -59,9 +59,8 @@ list(APPEND LINK_LIBS ${GNUTLS_LDFLAGS})
|
||||
|
||||
list(APPEND LINK_LIBS ${LIBGCRYPT_LDFLAGS})
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
# link with resolv lib on macOS
|
||||
list(APPEND LINK_LIBS "resolv")
|
||||
if(LIBRESOLV_HAS_RES_INIT)
|
||||
list(APPEND LINK_LIBS ${RESOLV_LIBRARY})
|
||||
endif()
|
||||
|
||||
target_link_libraries(irc ${LINK_LIBS} coverage_config)
|
||||
|
||||
@@ -38,9 +38,8 @@ set(LINK_LIBS)
|
||||
|
||||
list(APPEND LINK_LIBS ${LIBGCRYPT_LDFLAGS})
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
# link with resolv lib on macOS
|
||||
list(APPEND LINK_LIBS "resolv")
|
||||
if(LIBRESOLV_HAS_RES_INIT)
|
||||
list(APPEND LINK_LIBS ${RESOLV_LIBRARY})
|
||||
endif()
|
||||
|
||||
target_link_libraries(xfer ${LINK_LIBS} coverage_config)
|
||||
|
||||
Reference in New Issue
Block a user