diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-11-08 11:41:42 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-11-08 11:45:29 +0100 |
commit | 25023c796a9a55cd7ec7ff364cd1229fab958679 (patch) | |
tree | 74e2f8fcd78e0a0d35a79dbd32781fb82531b9f4 /CMakeLists.txt | |
parent | d9513e62bf484eea8a9ca63c2bfac10f4bdb6c9f (diff) |
add support for handling redirects via a script
In a json_script file you can specify rules for rewriting the URL or
redirecting the browser either unconditionally, or as a fallback where
it would otherwise print a 404 error
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c285dc..8514351 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ IF(LIBS STREQUAL "LIBS-NOTFOUND") SET(LIBS "") ENDIF() -SET(SOURCES main.c listen.c client.c utils.c file.c auth.c cgi.c relay.c proc.c plugin.c) +SET(SOURCES main.c listen.c client.c utils.c file.c auth.c cgi.c relay.c proc.c plugin.c handler.c) IF(TLS_SUPPORT) SET(SOURCES ${SOURCES} tls.c) ADD_DEFINITIONS(-DHAVE_TLS) @@ -33,7 +33,8 @@ IF(HAVE_SHADOW) ENDIF() ADD_EXECUTABLE(uhttpd ${SOURCES}) -TARGET_LINK_LIBRARIES(uhttpd ubox dl ${LIBS}) +FIND_LIBRARY(libjson NAMES json-c json) +TARGET_LINK_LIBRARIES(uhttpd ubox dl json_script blobmsg_json ${libjson} ${LIBS}) SET(PLUGINS "") IF(LUA_SUPPORT) @@ -69,7 +70,6 @@ IF(UBUS_SUPPORT) SET(PLUGINS ${PLUGINS} uhttpd_ubus) ADD_DEFINITIONS(-DHAVE_UBUS) ADD_LIBRARY(uhttpd_ubus MODULE ubus.c) - FIND_LIBRARY(libjson NAMES json-c json) TARGET_LINK_LIBRARIES(uhttpd_ubus ubus ubox blobmsg_json ${libjson}) ENDIF() |