apfree_wifidog/CMakeLists.txt
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

29 lines
605 B
CMake

cmake_minimum_required(VERSION 2.6)
project(ApFreeWiFidog C)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(LibEvent)
if(NOT LibEvent_FOUND)
message(FATAL_ERROR "libevent2 not found!")
endif(NOT LibEvent_FOUND)
find_package(OpenSSL)
if(NOT OPENSSL_FOUND)
message(FATAL_ERROR "OpenSSL not found!")
endif(NOT OPENSSL_FOUND)
find_package(JSON-C REQUIRED)
include_directories(${JSON-C_INCLUDE_DIR})
find_package(UCI REQUIRED)
include_directories(${UCI_INCLUDE_DIR})
if(LIB_INSTALL_DIR)
else()
set(LIB_INSTALL_DIR lib)
endif()
add_subdirectory(src)