mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
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.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
find_path(LUAJIT_INCLUDE_DIR luajit.h
|
||||
find_path2(LUAJIT_INCLUDE_DIR luajit.h
|
||||
PATH_SUFFIXES luajit-2.1)
|
||||
|
||||
if(MSVC)
|
||||
@ -9,7 +9,7 @@ else()
|
||||
list(APPEND LUAJIT_NAMES luajit-5.1)
|
||||
endif()
|
||||
|
||||
find_library(LUAJIT_LIBRARY NAMES ${LUAJIT_NAMES})
|
||||
find_library2(LUAJIT_LIBRARY NAMES ${LUAJIT_NAMES})
|
||||
|
||||
find_package_handle_standard_args(Luajit DEFAULT_MSG
|
||||
LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR)
|
||||
|
Reference in New Issue
Block a user