mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
CMake: Refer to Unibilium instead of LibUnibilium.
This commit is contained in:
@ -190,9 +190,9 @@ include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS})
|
||||
find_package(LuaJit REQUIRED)
|
||||
include_directories(SYSTEM ${LUAJIT_INCLUDE_DIRS})
|
||||
|
||||
option(LIBUNIBILIUM_USE_STATIC "Use static libunibilium" ON)
|
||||
find_package(LibUnibilium REQUIRED)
|
||||
include_directories(SYSTEM ${LIBUNIBILIUM_INCLUDE_DIRS})
|
||||
option(UNIBILIUM_USE_STATIC "Use static unibilium" ON)
|
||||
find_package(Unibilium REQUIRED)
|
||||
include_directories(SYSTEM ${UNIBILIUM_INCLUDE_DIRS})
|
||||
|
||||
option(LIBTERMKEY_USE_STATIC "Use static libtermkey" ON)
|
||||
find_package(LibTermkey REQUIRED)
|
||||
|
@ -1,48 +0,0 @@
|
||||
# - Try to find libunibilium
|
||||
# Once done this will define
|
||||
# LIBUNIBILIUM_FOUND - System has libunibilium
|
||||
# LIBUNIBILIUM_INCLUDE_DIRS - The libunibilium include directories
|
||||
# LIBUNIBILIUM_LIBRARIES - The libraries needed to use libunibilium
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(NOT LIBUNIBILIUM_USE_BUNDLED)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_LIBUNIBILIUM QUIET unibilium)
|
||||
endif()
|
||||
else()
|
||||
set(PC_LIBUNIBILIUM_INCLUDEDIR)
|
||||
set(PC_LIBUNIBILIUM_INCLUDE_DIRS)
|
||||
set(PC_LIBUNIBILIUM_LIBDIR)
|
||||
set(PC_LIBUNIBILIUM_LIBRARY_DIRS)
|
||||
set(LIMIT_SEARCH NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
set(LIBUNIBILIUM_DEFINITIONS ${PC_LIBUNIBILIUM_CFLAGS_OTHER})
|
||||
|
||||
find_path(LIBUNIBILIUM_INCLUDE_DIR unibilium.h
|
||||
PATHS ${PC_LIBUNIBILIUM_INCLUDEDIR} ${PC_LIBUNIBILIUM_INCLUDE_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
# If we're asked to use static linkage, add libuv.a as a preferred library name.
|
||||
if(LIBUNIBILIUM_USE_STATIC)
|
||||
list(APPEND LIBUNIBILIUM_NAMES
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}unibilium${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
list(APPEND LIBUNIBILIUM_NAMES unibilium)
|
||||
|
||||
find_library(LIBUNIBILIUM_LIBRARY NAMES ${LIBUNIBILIUM_NAMES}
|
||||
HINTS ${PC_LIBUNIBILIUM_LIBDIR} ${PC_LIBUNIBILIUM_LIBRARY_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
set(LIBUNIBILIUM_LIBRARIES ${LIBUNIBILIUM_LIBRARY})
|
||||
set(LIBUNIBILIUM_INCLUDE_DIRS ${LIBUNIBILIUM_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBUNIBILIUM_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(LibUnibilium DEFAULT_MSG
|
||||
LIBUNIBILIUM_LIBRARY LIBUNIBILIUM_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(LIBUNIBILIUM_INCLUDE_DIR LIBUNIBILIUM_LIBRARY)
|
48
cmake/FindUnibilium.cmake
Normal file
48
cmake/FindUnibilium.cmake
Normal file
@ -0,0 +1,48 @@
|
||||
# - Try to find unibilium
|
||||
# Once done this will define
|
||||
# UNIBILIUM_FOUND - System has unibilium
|
||||
# UNIBILIUM_INCLUDE_DIRS - The unibilium include directories
|
||||
# UNIBILIUM_LIBRARIES - The libraries needed to use unibilium
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(NOT UNIBILIUM_USE_BUNDLED)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_UNIBILIUM QUIET unibilium)
|
||||
endif()
|
||||
else()
|
||||
set(PC_UNIBILIUM_INCLUDEDIR)
|
||||
set(PC_UNIBILIUM_INCLUDE_DIRS)
|
||||
set(PC_UNIBILIUM_LIBDIR)
|
||||
set(PC_UNIBILIUM_LIBRARY_DIRS)
|
||||
set(LIMIT_SEARCH NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
set(UNIBILIUM_DEFINITIONS ${PC_UNIBILIUM_CFLAGS_OTHER})
|
||||
|
||||
find_path(UNIBILIUM_INCLUDE_DIR unibilium.h
|
||||
PATHS ${PC_UNIBILIUM_INCLUDEDIR} ${PC_UNIBILIUM_INCLUDE_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
# If we're asked to use static linkage, add libunibilium.a as a preferred library name.
|
||||
if(UNIBILIUM_USE_STATIC)
|
||||
list(APPEND UNIBILIUM_NAMES
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}unibilium${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
list(APPEND UNIBILIUM_NAMES unibilium)
|
||||
|
||||
find_library(UNIBILIUM_LIBRARY NAMES ${UNIBILIUM_NAMES}
|
||||
HINTS ${PC_UNIBILIUM_LIBDIR} ${PC_UNIBILIUM_LIBRARY_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
set(UNIBILIUM_LIBRARIES ${UNIBILIUM_LIBRARY})
|
||||
set(UNIBILIUM_INCLUDE_DIRS ${UNIBILIUM_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set UNIBILIUM_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(unibilium DEFAULT_MSG
|
||||
UNIBILIUM_LIBRARY UNIBILIUM_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(UNIBILIUM_INCLUDE_DIR UNIBILIUM_LIBRARY)
|
@ -163,7 +163,7 @@ list(APPEND NVIM_LINK_LIBRARIES
|
||||
${LUAJIT_LIBRARIES}
|
||||
${LIBVTERM_LIBRARIES}
|
||||
${LIBTERMKEY_LIBRARIES}
|
||||
${LIBUNIBILIUM_LIBRARIES}
|
||||
${UNIBILIUM_LIBRARIES}
|
||||
m
|
||||
util
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
|
Reference in New Issue
Block a user