ClickHouse/cmake/find/termcap.cmake
Konstantin Podshumok d989e59699
unbundled: link with termcap when using static llvm
ld.lld: error: undefined symbol: setupterm
referenced by Process.cpp.o:(llvm::sys::Process::FileDescriptorHasColors(int)) in archive /usr/lib/llvm-9/lib/libLLVMSupport.a

Squashed:
- fixup termcap + external llvm

Signed-off-by: Konstantin Podshumok <kpp.live+signed@gmail.com>
2020-08-25 20:16:42 +03:00

18 lines
565 B
CMake

if (ENABLE_EMBEDDED_COMPILER AND NOT USE_INTERNAL_LLVM_LIBRARY AND USE_STATIC_LIBRARIES)
find_library (TERMCAP_LIBRARY tinfo)
if (NOT TERMCAP_LIBRARY)
find_library (TERMCAP_LIBRARY ncurses)
endif()
if (NOT TERMCAP_LIBRARY)
find_library (TERMCAP_LIBRARY termcap)
endif()
if (NOT TERMCAP_LIBRARY)
message (FATAL_ERROR "Statically Linking external LLVM requires termcap")
endif()
target_link_libraries(LLVMSupport INTERFACE ${TERMCAP_LIBRARY})
message (STATUS "Using termcap: ${TERMCAP_LIBRARY}")
endif()