2016-11-16 16:38:33 +08:00
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
project(ApFreeWiFidog C)
|
|
|
|
|
2022-01-20 17:16:11 +08:00
|
|
|
set(CMAKE_C_STANDARD 11)
|
2018-02-27 13:54:55 +08:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
|
|
|
|
2022-01-28 09:59:34 +08:00
|
|
|
option(AW_DEBUG "Build debug" ON)
|
|
|
|
option(AW_WEBSSH "Build with web ssh support" OFF)
|
2022-01-20 17:16:11 +08:00
|
|
|
|
2018-02-27 13:54:55 +08:00
|
|
|
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)
|
|
|
|
|
2019-07-24 16:39:19 +08:00
|
|
|
find_package(JSON-C REQUIRED)
|
|
|
|
include_directories(${JSON-C_INCLUDE_DIR})
|
|
|
|
|
|
|
|
find_package(UCI REQUIRED)
|
|
|
|
include_directories(${UCI_INCLUDE_DIR})
|
|
|
|
|
2016-11-16 17:44:42 +08:00
|
|
|
if(LIB_INSTALL_DIR)
|
|
|
|
else()
|
|
|
|
set(LIB_INSTALL_DIR lib)
|
|
|
|
endif()
|
|
|
|
|
2016-11-16 16:38:33 +08:00
|
|
|
add_subdirectory(src)
|