build: improve libedit handling for builds

Use the `FindLibEdit.cmake` module from LLDB to properly control where
the libedit libraries are searched for and linked from as well as where
the headers come from.  This uses the standard mechanisms which allows
users to control where libedit is pulled from (which is important for
cross-compilation).
This commit is contained in:
Saleem Abdulrasool
2019-06-05 15:50:59 -07:00
parent 4974021caf
commit aca0509ac0
7 changed files with 82 additions and 17 deletions

View File

@@ -5,6 +5,9 @@ if(SWIFT_BUILD_REMOTE_MIRROR)
endif()
if(SWIFT_INCLUDE_TOOLS)
if(libedit_FOUND)
set(HAVE_UNICODE_LIBEDIT TRUE)
endif()
configure_file(Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Config.h
ESCAPE_QUOTES @ONLY)
add_subdirectory(Option)