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 7ae8ba4..564842d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,7 @@ ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -Os -Wall -Werror -Wmissing-declarations
OPTION(TLS_SUPPORT "TLS support" ON)
OPTION(LUA_SUPPORT "Lua support" ON)
OPTION(UBUS_SUPPORT "ubus support" ON)
+OPTION(UCODE_SUPPORT "ucode support" ON)
IF(APPLE)
INCLUDE_DIRECTORIES(/opt/local/include)
@@ -69,6 +70,13 @@ IF(LUA_SUPPORT)
TARGET_LINK_LIBRARIES(uhttpd_lua ${LUA_LIBS} m dl)
ENDIF()
+IF(UCODE_SUPPORT)
+ SET(PLUGINS ${PLUGINS} uhttpd_ucode)
+ ADD_DEFINITIONS(-DHAVE_UCODE)
+ ADD_LIBRARY(uhttpd_ucode MODULE ucode.c)
+ TARGET_LINK_LIBRARIES(uhttpd_ucode ucode ${libjson})
+ENDIF()
+
IF(UBUS_SUPPORT)
SET(PLUGINS ${PLUGINS} uhttpd_ubus)
ADD_DEFINITIONS(-DHAVE_UBUS)