Fix build when ncurses is in nonstandard prefix

This commit is contained in:
Ryan Burns 2020-07-21 20:56:12 -07:00 committed by ridiculousfish
parent 233945b58b
commit ca4f2369d1
2 changed files with 4 additions and 0 deletions

View file

@ -177,6 +177,8 @@ target_sources(fishlib PRIVATE ${FISH_HEADERS})
target_link_libraries(fishlib target_link_libraries(fishlib
${CURSES_LIBRARY} ${CURSES_EXTRA_LIBRARY} Threads::Threads ${CMAKE_DL_LIBS} ${CURSES_LIBRARY} ${CURSES_EXTRA_LIBRARY} Threads::Threads ${CMAKE_DL_LIBS}
${PCRE2_LIB} ${Intl_LIBRARIES} ${ATOMIC_LIBRARY}) ${PCRE2_LIB} ${Intl_LIBRARIES} ${ATOMIC_LIBRARY})
target_include_directories(fishlib PRIVATE
${CURSES_INCLUDE_DIRS})
# Define fish. # Define fish.
add_executable(fish src/fish.cpp) add_executable(fish src/fish.cpp)

View file

@ -32,6 +32,8 @@ if(NOT ${CURSES_FOUND})
set(CURSES_CURSES_LIBRARY ${CURSES_LIBRARIES}) set(CURSES_CURSES_LIBRARY ${CURSES_LIBRARIES})
set(CURSES_LIBRARY ${CURSES_LIBRARIES}) set(CURSES_LIBRARY ${CURSES_LIBRARIES})
endif() endif()
# Set up extra include directories for CheckIncludeFile
list(APPEND CMAKE_REQUIRED_INCLUDES ${CURSES_INCLUDE_DIRS})
# Fix undefined reference to tparm on RHEL 6 and potentially others # 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 # If curses is found via CMake, it also links against tinfo if it exists. But if we use our