mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
build: cmake cleanup (#22251)
- Remove unused code - Use consistent casing. Variable names such as LibLuV_LIBRARIES is needlessly jarring, even if the name might be technically correct. - Use title casing for packages. find_package(unibilium) requires the find_module to be named "Findunibilium.cmake", which makes it harder to spot when scanning the files. Instead, use "Unibilium".
This commit is contained in:
20
cmake/FindLuajit.cmake
Normal file
20
cmake/FindLuajit.cmake
Normal file
@ -0,0 +1,20 @@
|
||||
find_path(LUAJIT_INCLUDE_DIR luajit.h
|
||||
PATH_SUFFIXES luajit-2.0 luajit-2.1)
|
||||
|
||||
if(MSVC)
|
||||
list(APPEND LUAJIT_NAMES lua51)
|
||||
elseif(MINGW)
|
||||
list(APPEND LUAJIT_NAMES libluajit libluajit-5.1)
|
||||
else()
|
||||
list(APPEND LUAJIT_NAMES luajit-5.1)
|
||||
endif()
|
||||
|
||||
find_library(LUAJIT_LIBRARY NAMES ${LUAJIT_NAMES})
|
||||
|
||||
set(LUAJIT_LIBRARIES ${LUAJIT_LIBRARY})
|
||||
set(LUAJIT_INCLUDE_DIRS ${LUAJIT_INCLUDE_DIR})
|
||||
|
||||
find_package_handle_standard_args(Luajit DEFAULT_MSG
|
||||
LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(LUAJIT_INCLUDE_DIR LUAJIT_LIBRARY)
|
Reference in New Issue
Block a user