################################################################################
#
# UHTTPD_3P
#
################################################################################

UHTTPD_3P_VERSION:= 2016.10.25

UHTTPD_3P_SITE =  $(TOPDIR)/../../src/3P/uhttpd/builders/cmake
UHTTPD_3P_SITE_METHOD = local
UHTTPD_3P_INSTALL_STAGING = YES

ifeq ($(BR2_PACKAGE_UHTTPD_REST_API_PLUGIN),y)
UHTTPD_3P_CONF_OPTS += -DREST_API_PLUGING=ON
endif

ifeq ($(BR2_PACKAGE_UHTTPD_UBUS_SUPPORT),y)
UHTTPD_3P_CONF_OPTS += -DUBUS_SUPPORT=ON
endif
# blobmsg_json crypt json_script
UHTTPD_3P_DEPENDENCIES = libubox json-c

UHTTPD_3P_CONF_OPTS += -DworkspaceRoot=$(TOPDIR)/../.. -DMODULE_PATH=$(TOPDIR)/../../bsp/cmake-modules -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)

$(eval $(cmake-package))
