Commit Graph

5 Commits

Author SHA1 Message Date
Tom Scogland
e178331488 build(lpeg): search for lpeg.so on MacOS
Problem: Currently Neovim only searches for lpeg.dylib, liblpeg.dylib,
etc. on MacOS, but a normal installation of lpeg will produce lpeg.so
instead.  There are explicit workarounds for this by modifying lpeg's
package in Homebrew, and will shortly be another in spack.

Solution: also search for lpeg.so even if that's not the platform
default, because Lua and luarocks use it anyway.
2024-10-22 14:29:20 +02:00
dundargoc
b80a8e2c16 build: adjust how find order is prioritized
Ensure bundled libraries and include directories are always searched
first before any others. This will provide a more consistent experience
as the search order of the builtin find_ functions can vary depending on
system. This should make the build process faster when building with
bundled deps as we limit the search to only the .deps directory.
Separating the search between .deps and everything makes debugging
find_-related problems simpler if you need to check how dependencies are
found.

For libraries, we divide the search process into the following order:
1. Only search in .deps directory and only search for static libraries.
2. Only search in .deps directory and search for all libraries.
3. Search everywhere and search for all libraries.

Make an exception for FindLibintl.cmake as changing the search order
seems to break some tests on macos.
2023-10-16 20:15:41 +02:00
dundargoc
c50951a4d0
build: various fixes
- simplify lua interpreter search
- fix incorrect variable name in BuildLua.cmake
- build PUC Lua with -O2
- silence non-mandatory find_package search for libuv
- simplify Find modules
- Prefer using the explicitly set CI_BUILD over relying on the
  environment variable "CI".
2023-09-04 00:00:26 +02:00
dundargoc
9f9cef1b56
build: make lpeg an imported library
Cmake truncates the full link path to a shared library if it is missing
an SONAME in some undocumented scenarios. This causes builds in some
systems to fail if "lpeg" isn't a library on the system path.

The path of imported libraries aren't modified by cmake, so we can use
that as a workaround until a proper solution for this has been
identified.

Closes https://github.com/neovim/neovim/issues/23395.
2023-04-30 23:57:15 +02:00
bfredl
45bcf83869 refactor(build): include lpeg as a library 2023-04-27 11:40:00 +02:00