diff options
author | George Zhao <zhaozg@gmail.com> | 2019-06-10 20:13:18 +0800 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-06-10 14:13:18 +0200 |
commit | c83926cd0aa5720e88e84fa3fae3c0e689cca3ef (patch) | |
tree | b0511481bce7d76b4dfe91b1bdc6d626eeeb5f40 /cmake | |
parent | 3e58e60568c2acc765f3ee72295e2f15baa3cf52 (diff) | |
download | rneovim-c83926cd0aa5720e88e84fa3fae3c0e689cca3ef.tar.gz rneovim-c83926cd0aa5720e88e84fa3fae3c0e689cca3ef.tar.bz2 rneovim-c83926cd0aa5720e88e84fa3fae3c0e689cca3ef.zip |
lua: introduce vim.loop (expose libuv event-loop) #10123
Co-authored-by: Andrey Popp <8mayday@gmail.com>
closes #9546
closes #10084
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindLibLUV.cmake | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cmake/FindLibLUV.cmake b/cmake/FindLibLUV.cmake new file mode 100644 index 0000000000..d8ce9264c3 --- /dev/null +++ b/cmake/FindLibLUV.cmake @@ -0,0 +1,32 @@ +# - Try to find luv +# Once done this will define +# LIBLUV_FOUND - System has libluv +# LIBLUV_INCLUDE_DIRS - The libluv include directories +# LIBLUV_LIBRARIES - The libraries needed to use libluv + +find_path(LIBLUV_INCLUDE_DIR luv/luv.h + PATHS ${PC_LIBLUV_INCLUDEDIR} ${PC_LIBLUV_INCLUDE_DIRS} + ${LIMIT_SEARCH}) + +# If we're asked to use static linkage, add libluv.a as a preferred library name. +if(LIBLUV_USE_STATIC) + list(APPEND LIBLUV_NAMES + "${CMAKE_STATIC_LIBRARY_PREFIX}luv${CMAKE_STATIC_LIBRARY_SUFFIX}") +endif() + +list(APPEND LIBLUV_NAMES luv) + +find_library(LIBLUV_LIBRARY NAMES ${LIBLUV_NAMES} + HINTS ${PC_LIBLUV_LIBDIR} ${PC_LIBLUV_LIBRARY_DIRS} + ${LIMIT_SEARCH}) + +set(LIBLUV_LIBRARIES ${LIBLUV_LIBRARY}) +set(LIBLUV_INCLUDE_DIRS ${LIBLUV_INCLUDE_DIR}) + +include(FindPackageHandleStandardArgs) +# handle the QUIETLY and REQUIRED arguments and set LIBLUV_FOUND to TRUE +# if all listed variables are TRUE +find_package_handle_standard_args(libluv DEFAULT_MSG + LIBLUV_LIBRARY LIBLUV_INCLUDE_DIR) + +mark_as_advanced(LIBLUV_INCLUDE_DIR LIBLUV_LIBRARY) |