set(PLUGIN_NAME protocol_deaddrop)
set(requirements 1)
require_lws_config(LWS_ROLE_WS 1 requirements)
require_lws_config(LWS_WITH_JOSE 1 requirements)

if (requirements)
	if (UNIX AND LWS_HAVE_PTHREAD_H)
		create_plugin(${PLUGIN_NAME} "" "protocol_lws_deaddrop.c" "" "")
		if (NOT LWS_WITH_PLUGINS_BUILTIN)
			target_compile_definitions(${PLUGIN_NAME} PRIVATE LWS_BUILDING_SHARED)
		endif()

		if (NOT WIN32 AND LWS_WITH_PLUGINS AND NOT LWS_WITH_PLUGINS_BUILTIN)
			install(FILES assets/index.html assets/deaddrop.js assets/deaddrop.css assets/drop.svg DESTINATION share/libwebsockets-test-server/deaddrop COMPONENT plugins)
		endif()
	endif()
endif()
