message: don't assume that ncurses is a system library on macOS
  Let CMake find libcurses/libncurse and libtinfo also on macOS.
  Don't link to CURSES_LIBRARIES, which would also contain libform, but
  only to CURSES_CURSES_LIBRARY and CURSES_EXTRA_LIBRARY, which points to
  libtinfo, if found.
diff: @@ -531,18 +531,17 @@ endif()
  # System libraries, our own and transitive dependencies from LLVM libs.
  if (WIN32)
  target_link_libraries(${PROJECT_NAME} version.lib shlwapi.lib odbc32.lib odbccp32.lib)
  -else()
  - if (APPLE)
  - target_link_libraries(${PROJECT_NAME} pthread z curses)
  else()
  if (ISPC_STATIC_LINK)
  target_link_libraries(${PROJECT_NAME} pthread z.a tinfo.a curses.a)
  else()
  find_package(Curses REQUIRED)
  find_package(ZLIB REQUIRED)
  - find_library(NCURSES_TINFO_LIBRARY tinfo)
  - target_link_libraries(${PROJECT_NAME} pthread ${ZLIB_LIBRARIES} ${NCURSES_TINFO_LIBRARY} ${CURSES_LIBRARIES})
  + if (CURSES_EXTRA_LIBRARY)
  + # this contains the tinfo library, if found
  + target_link_libraries(${PROJECT_NAME} ${CURSES_EXTRA_LIBRARY})
  endif()
  + target_link_libraries(${PROJECT_NAME} pthread ${ZLIB_LIBRARIES} ${CURSES_CURSES_LIBRARY})
  endif()
  endif()
  