mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-20 23:45:11 +08:00
Fix missing references when manually linking against curses
When CMake's own curses logic fails to find curses/ncurses, we fall back to pkg-config and manually link the required libraries. Some platforms (RHEL 6, see #6587) require CURSES_EXTRA_LIBRARY=tinfo, so we link against libtinfo if it's found but are happy to continue without it if it doesn't exist. Closes #6587
This commit is contained in:
parent
35cb449aa1
commit
4a5f0f3a3d
@ -33,6 +33,14 @@ if(NOT ${CURSES_FOUND})
|
||||
set(CURSES_LIBRARY ${CURSES_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# Fix undefined reference to tparm on RHEL 6 and potentially others
|
||||
# If curses is found via CMake, it also links against tinfo if it exists. But if we use our
|
||||
# fallback pkg-config logic above, we need to do this manually.
|
||||
find_library(CURSES_TINFO tinfo)
|
||||
if (CURSES_TINFO)
|
||||
set(CURSES_LIBRARY ${CURSES_LIBRARY} ${CURSES_TINFO})
|
||||
endif()
|
||||
|
||||
# Get threads.
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
# FindThreads < 3.4.0 doesn't work for C++-only projects
|
||||
|
Loading…
x
Reference in New Issue
Block a user