|
| 1 | +From a776fb1867b92dee37c1a6c58de499087c98050c Mon Sep 17 00:00:00 2001 |
| 2 | +From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= < [email protected]> |
| 3 | +Date: Sat, 21 Dec 2024 15:03:21 +0100 |
| 4 | +Subject: [PATCH] core: fix detection of dl library |
| 5 | + |
| 6 | +This fixes the linking to curl and ncurses on macOS. |
| 7 | +--- |
| 8 | + CMakeLists.txt | 4 +--- |
| 9 | + 1 file changed, 1 insertion(+), 3 deletions(-) |
| 10 | + |
| 11 | +diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 12 | +index 5d15a35489f..d235060983a 100644 |
| 13 | +--- CMakeLists.txt |
| 14 | ++++ CMakeLists.txt |
| 15 | +@@ -247,9 +247,7 @@ find_library(DL_LIBRARY |
| 16 | + PATHS /lib /usr/lib /usr/libexec /usr/local/lib /usr/local/libexec |
| 17 | + ) |
| 18 | + if(DL_LIBRARY) |
| 19 | +- string(REGEX REPLACE "/[^/]*$" "" DL_LIBRARY_PATH "${DL_LIBRARY}") |
| 20 | +- set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${DL_LIBRARY_PATH}") |
| 21 | +- list(APPEND EXTRA_LIBS dl) |
| 22 | ++ list(APPEND EXTRA_LIBS ${DL_LIBRARY}) |
| 23 | + endif() |
| 24 | + |
| 25 | + add_subdirectory(icons) |
| 26 | + |
| 27 | +From c73fcbfd3310998c4488af6bdd1fbc4b72604d76 Mon Sep 17 00:00:00 2001 |
| 28 | +From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= < [email protected]> |
| 29 | +Date: Sat, 21 Dec 2024 14:42:12 +0100 |
| 30 | +Subject: [PATCH] core: add option POST_BUILD in add_custom_command |
| 31 | + |
| 32 | +This fixes the following CMake warning: |
| 33 | + |
| 34 | +CMake Warning (dev) at src/gui/curses/normal/CMakeLists.txt:73 (add_custom_command): |
| 35 | + Exactly one of PRE_BUILD, PRE_LINK, or POST_BUILD must be given. Assuming |
| 36 | + POST_BUILD to preserve backward compatibility. |
| 37 | + |
| 38 | + Policy CMP0175 is not set: add_custom_command() rejects invalid arguments. |
| 39 | + Run "cmake --help-policy CMP0175" for policy details. Use the cmake_policy |
| 40 | + command to set the policy and suppress this warning. |
| 41 | +This warning is for project developers. Use -Wno-dev to suppress it. |
| 42 | +--- |
| 43 | + src/gui/curses/normal/CMakeLists.txt | 1 + |
| 44 | + 1 file changed, 1 insertion(+) |
| 45 | + |
| 46 | +diff --git a/src/gui/curses/normal/CMakeLists.txt b/src/gui/curses/normal/CMakeLists.txt |
| 47 | +index 1716905a809..43c48de74c8 100644 |
| 48 | +--- src/gui/curses/normal/CMakeLists.txt |
| 49 | ++++ src/gui/curses/normal/CMakeLists.txt |
| 50 | +@@ -72,6 +72,7 @@ target_link_libraries(${EXECUTABLE} |
| 51 | + # It may be removed in future. |
| 52 | + add_custom_command( |
| 53 | + TARGET ${EXECUTABLE} |
| 54 | ++ POST_BUILD |
| 55 | + COMMAND ${CMAKE_COMMAND} -E remove -f "weechat-curses${CMAKE_EXECUTABLE_SUFFIX}" |
| 56 | + COMMAND ${CMAKE_COMMAND} -E create_symlink "weechat${CMAKE_EXECUTABLE_SUFFIX}" "weechat-curses${CMAKE_EXECUTABLE_SUFFIX}" |
| 57 | + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" |
0 commit comments