23 lines
890 B
CMake
Executable File
23 lines
890 B
CMake
Executable File
# - Try to find libubox
|
|
# Once done this will define
|
|
# LIBUBOX_FOUND - System has libubox
|
|
# LIBUBOX_INCLUDE_DIRS - The libubox include directories
|
|
# LIBUBOX_LIBRARIES - The libraries needed to use libubox
|
|
|
|
find_path(LIBUBOX_INCLUDE_DIR uloop.h PATH_SUFFIXES libubox)
|
|
find_library(LIBUBOX_LIBRARY ubox PATH_SUFFIXES lib64)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
# handle the QUIETLY and REQUIRED arguments and set LIBUBOX_FOUND to TRUE
|
|
# if all listed variables are TRUE and the requested version matches.
|
|
find_package_handle_standard_args(Libubox REQUIRED_VARS
|
|
LIBUBOX_LIBRARY LIBUBOX_INCLUDE_DIR
|
|
VERSION_VAR LIBUBOX_VERSION)
|
|
|
|
if(LIBUBOX_FOUND)
|
|
set(LIBUBOX_LIBRARIES ${LIBUBOX_LIBRARY})
|
|
set(LIBUBOX_INCLUDE_DIRS ${LIBUBOX_INCLUDE_DIR})
|
|
endif()
|
|
|
|
mark_as_advanced(LIBUBOX_INCLUDE_DIR LIBUBOX_LIBRARY)
|