Commit Graph

6 Commits

Author SHA1 Message Date
Daniel Rodríguez Troitiño
b4090419ea [cmake] Modify libedit target name to match LLVM's FindLibEdit
For unified builds, LLVM with the update to stable/20221013 includes its
own FindLibEdit, which shares many of the same names than Swift's
FindLibEdit, except that they differ in the target name.

Match both LLVM and Swift target names, so unified builds can find
LibEdit::LibEdit correctly and not try to link against libedit
mistakenly.

This should not affect Darwin/Linux builds from upstream Swift, since
they build non-unified in most people setups (including CI).
2023-03-07 17:10:11 -08:00
Saleem Abdulrasool
9d9a5ce340 build: add imported library for libedit
This allows us to use CMake more effectively rather than proliferating
the linking and header search path logic.
2020-01-23 14:14:43 -08:00
Saleem Abdulrasool
dbc3b433ad build: synchronise with LLDB's version of FindLibEdit
The current FOUND_VAR for FindLibEdit is libedit_FOUND but wasn't set by
find_package_handle_standard_args. However this isn't valid for the
package name.

  The argument for FOUND_VAR is "libedit_FOUND", but only
  "LibEdit_FOUND" and "LIBEDIT_FOUND" are valid names.

This fixes all the variables set by FindLibEdit to match the desired
naming scheme.

Thanks to Jonas for fixing the variable names!
2020-01-02 14:16:58 -08:00
Saleem Abdulrasool
1b850a2afd 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 second version is more aggressive about pruning the libedit
handling.  The Ubuntu 14.04 version of libedit does not have
`histedit.h`, and the intent is to rely on that to determine if we have
unicode support or not.
2019-12-29 16:32:49 -08:00
Brent Royal-Gordon
fe3ec0c717 Revert "build: improve libedit handling for builds" 2019-07-07 12:08:37 -07:00
Saleem Abdulrasool
aca0509ac0 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).
2019-07-06 14:33:03 -07:00