apfree_wifidog/cmake/Modules/FindUCI.cmake
Dengfeng Liu 2364a5a768 add json-c and uci library check
Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
2019-07-24 16:39:19 +08:00

22 lines
612 B
CMake

# UCI_FOUND - true if library and headers were found
# UCI_INCLUDE_DIRS - include directories
# UCI_LIBRARIES - library directories
find_package(PkgConfig)
pkg_check_modules(PC_UCI QUIET uci)
find_path(UCI_INCLUDE_DIR uci.h
HINTS ${PC_UCI_INCLUDEDIR} ${PC_UCI_INCLUDE_DIRS})
find_library(UCI_LIBRARY NAMES uci libuci
HINTS ${PC_UCI_LIBDIR} ${PC_UCI_LIBRARY_DIRS})
set(UCI_LIBRARIES ${UCI_LIBRARY})
set(UCI_INCLUDE_DIRS ${UCI_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(UCI DEFAULT_MSG UCI_LIBRARY UCI_INCLUDE_DIR)
mark_as_advanced(UCI_INCLUDE_DIR UCI_LIBRARY)