From c26ff6c51b4ee9b729f934209234e4a478bb8a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 21 Dec 2024 15:03:21 +0100 Subject: [PATCH] core: fix detection of dl library (closes #2218) This fixes the linking to curl and ncurses on macOS. --- CHANGELOG.md | 1 + CMakeLists.txt | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8d677a83..3000853da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixed +- core: fix detection of dl library ([#2218](https://github.com/weechat/weechat/issues/2218)) - logger: fix path displayed when the logs directory can not be created - perl: fix build with Perl < 5.7.29 ([#2219](https://github.com/weechat/weechat/issues/2219), [#2220](https://github.com/weechat/weechat/issues/2220)) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d15a3548..d23506098 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -247,9 +247,7 @@ find_library(DL_LIBRARY PATHS /lib /usr/lib /usr/libexec /usr/local/lib /usr/local/libexec ) if(DL_LIBRARY) - string(REGEX REPLACE "/[^/]*$" "" DL_LIBRARY_PATH "${DL_LIBRARY}") - set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${DL_LIBRARY_PATH}") - list(APPEND EXTRA_LIBS dl) + list(APPEND EXTRA_LIBS ${DL_LIBRARY}) endif() add_subdirectory(icons)