summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 889c32e..0d9dcd4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,7 @@ ADD_DEFINITIONS(-Os -Wall -Werror -Wmissing-declarations --std=gnu99 -g3)
OPTION(TLS_SUPPORT "TLS support" ON)
OPTION(LUA_SUPPORT "Lua support" ON)
+OPTION(UBUS_SUPPORT "ubus support" ON)
IF(APPLE)
INCLUDE_DIRECTORIES(/opt/local/include)
@@ -56,6 +57,13 @@ IF(LUA_SUPPORT)
TARGET_LINK_LIBRARIES(uhttpd_lua ${LUA_LIBS} m dl)
ENDIF()
+IF(UBUS_SUPPORT)
+ SET(PLUGINS ${PLUGINS} uhttpd_ubus)
+ ADD_DEFINITIONS(-DHAVE_UBUS)
+ ADD_LIBRARY(uhttpd_ubus MODULE ubus.c)
+ TARGET_LINK_LIBRARIES(uhttpd_ubus ubus ubox blobmsg_json json)
+ENDIF()
+
IF(PLUGINS)
SET_TARGET_PROPERTIES(${PLUGINS} PROPERTIES
PREFIX ""